In Shakespeare's play, Hamlet, I believe that finally seeing Claudius' guilty reaction to the play, feeling the sad responsibility for Polonius' death, reflecting again on his father's murder, and knowing that Rosencrantz and Guildenstern are escorting him to London—probably with the intent of seeing Hamlet dead—Hamlet realizes that death is not only inevitable for everyone, but that a natural death in this castle is not the norm. There seems little hope that death by natural causes is an option for many (or any) of them.
Hamlet has told the King that a king and a beggar are "equalized" in death.
Your fat king and your lean beggar is but variable service, two dishes, but to one table. (IV.iii.26-28)
Hamlet is now certain Claudius has killed Old Hamlet and that there is no longer reason to hesitate in taking the King's life.
When we reflect back on Hamlet's famous "To be or not to be" speech, his struggle with life and death, with continuing in his miserable existence or taking his own life, that Hamlet has been forced to grow up and face not just the mortality of those around him, but his own as well. He also sees that life can be translated to life as "taking action" and death to "not taking action." Should he act, or should he wait (in that the Ghost may be evil or an hallucination)?
...in the "to be, or not to be" speech,...Hamlet uses "being" to allude to both life and action, and "not being" to death and inaction...
Hamlet sees life and death on two separate levels: the philosophical and the physical. Other tragic deaths will follow that will solidify Hamlet's newfound enlightenment to the sense that as surely as there is life, there is death, and failure to act is like death.
Now it seems that Hamlet is aware of the true nature of the cycle of life and has resolved that he will not run from it (or his responsibilities), but will do what is necessary. The choice was taken from his hands once Claudius murdered Old Hamlet, and Hamlet learned the truth. Hamlet has come to terms with the inevitability of death.