It is a long contemplation of suicide to end Hamlet's problems. Is life worth it? What do we get for all we suffer? Why do we let those in power make ill use of us? Wouldn't it be better to just end it so that we no long suffer what he calls "the slings and arrows of outrageous fortune"?
Yes it would be, EXCEPT for what may happen after we are dead ... "what dreams may come." Suicide was traditionally considered the unforgiveable sin because, in the Christian belief system, suicide abandons hope in God's help and mercy. So if suicide puts us in hell for all eternity, might it not be better to suffer those slings and arrows?
Obviously, Hamlet decides it is.
"To be or not to be, that is the question
Whether 'tis nobler in the mind to suffer
The slings and arrows of outrageous fortune,
Or to take arms against a sea of troubles,
And by opposing end them?"
Hamlet, in this soliloquy, is asking a rhetorical question of himself and the audience. Essentially, he is saying, "Is it better to face one's problems and issues head-on, or simply lie down and let nature take its course?" This soliloquy is one of the most memorable in all of Shakespeare. Another memorable piece is the "All the world's a stage" excerpt from "As You Like It."
Plays during Shakespeare's time were particularly fond of using the soliloquy to allow the audience insight to the character's mind. The Hamlet soliloquy is no different.