Death permeates Hamlet right from the opening scene of the play, where the ghost of Hamlets father introduces the idea of death and its consequences. The ghost represents a disruption to the accepted social order a theme also reflected in the volatile socio-political state of Denmark and Hamlets own indecision.
This disorder has been triggered by the "unnatural death" of Denmark's figurehead, soon followed by a raft of murder, suicide, revenge and accidental deaths.
Hamlet is fascinated by death throughout the play. Although this is deeply rooted in his character, it could be a product of his grief. Hamlets most potent consideration of death comes in Act 4, Scene 3. His almost morbid obsession with the idea is revealed when asked by Claudius where he has hidden Polonius body.
HAMLET
At supper Not where he eats, but where a is eaten. A certain convocation of politic worms are een at him. Your worm is your only emperor for diet. We fat all creatures else to fat us, and we fat ourselves for maggots. Your fat king and your lean beggar is but variable service two dishes, but to one table. Thats the end.
Hamlet is describing the life-cycle of human existence. In other words: we eat in life; we are eaten in death. The frailty of human existence haunts Hamlet throughout the play and its a theme he returns to in Act 5, Scene 1: the iconic graveyard scene. Holding Yoricks skull, he explores the brevity and futility of the human condition and the inevitability of death:
HAMLETNo, faith, not a jot; but to follow him thither with modesty enough, and likelihood to lead it, as thus: Alexander died, Alexander was buried, Alexander returneth into dust, the dust is earth, of earth we make loam, and why of that loam whereto he was converted might they not stop at a beer-barrel?
This sets the scene for Ophelias funeral where she too will be returned to the ground.
The idea of suicide also emerges from Hamlets preoccupation with death. Although he seems to consider this is an option, he does not act. Similarly, he does not act when he has the opportunity to kill Claudius and avenge the murder of his father in Act 3, Scene 3. Ironically, it is this lack of action on Hamlets part that ultimately leads to his death at the end of the play.

