Although Hamlet seems suicidal throughout the play, it is not only revenge that is keeping him from committing suicide. Hamlet is somewhat religious and he fears what may be in store for him when he dies. Even though his current suffering is immense, he is not sure that it is worse than what is waiting for him when he dies.
“…Who would fardels bear,
To grunt and sweat under a weary life,
But that the dread of something after death,
The undiscovered country, from whose bourn
No traveler returns, puzzles the will,
and makes us rather bear those ills we have,
than fly to others that we know not of?” (pp 64, lines 76-82)
Hamlet widens the scope of this fear of death and includes it as a part of the human condition. His word choice is very specific and the use of the words grunt and sweat creates an image of a poor working person. This person must have extreme anxiety about what follows death because the person has a miserable life but prefers living to death. We do not actually know if there is a heaven or if there is a hell and we do not know what entitles a person to go to either of them. The fear of a worse situation after death inspires a more accepting view of his current reality.