Concerns about the nature of man and the nature of death go to the heart of Shakespeare's tragedy of Hamlet. Throughout this drama, then, there are several elements that support the theme of death:
Perhaps the most well-known line spoken by Marcellus in Act I, Scene 4--"Something is rotten in the state of Denmark"--points to the idea of death that is introduced in the next scene in which King Hamlet's ghost appears to Prince Hamlet and relates to his son the details of his regicide and asks Hamlet to avenge his death. The words of this ghost stir and enrage Hamlet.
Haste me to know't...
As meditation or the thoughts of love,
May sweep to my revenge. (1.5.28-30)
In Act 2, Scene 1, as Hamlet toys with Polonius by pretending madness, Hamlet alludes to decay:
For if the sun breed maggots in a dead dog,
being a good kissing carrion - Have you a daughter? (182-183)
Later in Scene 2, as he talks to Rosencrantz and Guildenstern, Hamlet refers to Denmark as a "...foul and pestilent congregation of vapors" (307-308).
After he watches the Murder of Gonzago, King Claudius is found meditating by Hamlet: "O, my offense is rank, it smells to heaven..." (l.36).
Further, in Act V, in the graveyard scene, Hamlet's ruminations on death reach the level of the grotesque. There is an allusion to rot as Hamlet speaks of the smell of decay from the skull of Yorick which he holds: "And smelt so!" (l.172). But the whole country of Denmark smells of rot and decay to Hamlet who is still frustrated with himself for his lack of action against Claudius.
There are murders throughout the play: King Hamlet's, Polonius's, Rosencrantz's and Guildenstern's; at the end of the play the other key figures all die--Gertrude, Laertes, Claudius, and Hamlet.
Early in the play, Hamlet contemplates suicide as he senses the futility of life since everyone is mortal. His famous fourth soliloquy is Hamlet's melancholy meditation on suicide and how it may be an end to his misery:
....To die, to sleep--
To sleep, perchance to dream... (3.1.64-65)
However, Hamlet considers that suicide has its spiritual consequences:
But that dread of something after death,...
Than fly to others that we know not of?
Thus conscience does make cowards of us all (3.1.78-83)
Later, the exploited Ophelia kills herself. At her grave Queen Gertrude bemoans her untimely death:
What, the fair Ophelia!...
I hoped thou shouldst have been my Hamlet's wife,
I thought thy bride-bed to have decked, sweet maid
And not have strewed thy grave. (5.1.211-215)