This scene goes through a couple of different "phases" for lack of a better word. At the start of the scene, Hamlet and Horatio are merely observers of the gravediggers actions, and Hamlet is contemplating death from a kind of outsider's perspective and realizing that death comes to everyone and that death is a great equalizer -- ashes to ashes -- no matter who you were in life, whether a common man or Alexander the Great. Once he approaches the grave diggers, two things happen. First we see his wit when he and the gravedigger are joking about whose grave it is, then we see a complete reversal. When he is told he is holding Yorick's skull, Hamlet become somber at the reality of death -- he is intimately involved with the dead body of someone he knew and he was close too. The jokes are over, and death is VERY real to him. It becomes too real when he see Ophelia's funeral procession enter the graveyard. Now, the dead body is of the woman he loved. He goes a bit crazy in his declaration of that love, but it kind of makes sense in light of the realizations of death he has just worked through for himself. Hamlet has been contemplating death throughout the entire play, and it is after this scene that he is truly able to let all the thinking go, and give himself over to action. He even tells Horatio, "The readiness is all" before he goes to the duel that will ultmately end his life.
The gravediggers scene in Act V.i of Hamlet reveals the following about the Prince:
- it foreshadows his death. This final act begins with death and will end with every major character dead by its end.
- reveals his tragic-comedic fixation with death. The gravediggers show the dark humor connected with death. Hamlet finds the jester's skull, a comedian's death-relic (more black humor). Hamlet begins to see death as absurdity.
- reveals Hamlet's culpability in Ophelia's suicide. Yes, they've decided to give her a Christian burial, but her drowning was no accident. Hamlet, among other men, drove her to madness and death by, ironically, pretending to be mad.
- sets the scene for the fight in the grave between Laertes and Hamlet. This fight will soon be repeated in the duel.
All true. This particular scene in Hamlet is one of the most introspective scenes in the play outside of the soliloquies, it seems to me. Because these "clowns" don't know who he is, he is able to speak without pretense, which he does through much of the rest of the play--so much so that we're not alwayssure when he's serious and when he's putting on his "antic disposition." When he talks to them, Hamlet is funny and witty, enjoying wordplay as we know he does throughout. When he and Horatio are watching one of the gravediggers uncover the skull of what turns out to be Yorrick, Hamlet it pensive. He reflects, as he does many times in the play, on the concept of death; however, he does so here in a much more somber and final way--a clear foreshadowing of his impending death.
His observation is that everyone is equal at death--Alexander the Great and Caesar are just as dead as his former friend, the jester Yorrick. All of them--and all of us--end up in the same place, mingling with the dust: "To what base uses we may return." It's true Hamlet has reflected on his own death before; this time, we see he is reflecting on the universality and reality of death.
Finally, we see a grief-stricken Hamlet who does not appear to be acting. He is struck, as has been mentioned, by his culpability for Ophelia's death; and his reaction to seeing her corpse speaks of genuine loss and love. It's here we have our suspicions confirmed, it seems to me: Hamlet did, indeed, love Ophelia.