Throughout the drama of Hamlet, Prince Hamlet contemplates death in the fear of the unknown; however, in Act V, Hamlet's thoughts take a very serious turn as he realizes what an equalizer death is. This turn of thought prompts maturity and action.
In the early acts, Hamlet is obsessed with the meaning of life and the question of death. He wonders what happens after death, and his anxiety about the afterlife prevents him from acting on the ghost's appeal and from committing suicide to end his dilemmas--"To be or not to be." This preoccupation precipitates Hamlet's meditations on the uncertainty and absurdity of life, as well as his hesitation in killing Claudius lest he become a martyr as he prays, and thereby earn heaven.
But, in Act V as Hamlet beholds the skulls, particularly that of Yorick, this experience of realizing that Death is the great equalizer finally removes Hamlet from his youth. For, after this experience, Hamlet abandons his "antic disposition," and he himself envisions a new man emerging as he declares, "This is I/ Hamlet the Dane" (5.1.226-227). Further, he warns Laertes, "Yet have I in me something dangerous (5.1.232). As renowned Shakespearean critic Harold Bloom writes, Hamlet is "beyond maturity at the close."
Indeed, in Act V, Hamlet has finally looked into the existential condition of man, and has gained the knowledge that he needs to finally act upon what he has deliberated for the previous four acts. Moreover, his famous "To be" soliloquy is the existential foundation for much of what he utter in Act V. Bloom calls it Hamlet's "death speech in advance, the prolepsis of his transcendence."
Shakespeare: The Invention of the Human. New York: Riverhead, 1998. Print.