I'm thinking the coffin contained someone they knew on the island (because Jack thought that Kate would care) and that the person is the kind of person who would seem as if he or she would have loved ones who'd come to his or her funeral (to explain Jack's shock). Also, it seemed like the death of this person provoked Jack's feelings of regret over leaving the Island and multiplied his suicidal mood. Since Locke didn't want to leave the Island, the criteria would all point to him the most I guess.
I just have one problem, when the funeral guy asks Jack whether he is friend or family, did you guys hear him say "either" or "neither"? I have two friends who heard "neither," but even when I listen closely and try to hear "neither" I still hear "either." Both either and neither create problems in terms of guessing who was in the coffin, but I don't know.