"To be or not to be?" What?
What I find apropos about your question is that Hamlet chooses not to kill himself during his monologue expressly because he fears "what dreams may come when we have shuffled off this mortal coil" which is to say god and a Christian idea of heaven and hell. If Hamlet were an Atheist he may have just committed suicide like Ophelia and been done with it!
Begs the question, which is likely the largest delta betwixt us and theist. Fear of death. How many books, how many movies would be entirely different if we moved the needle on the value of, or cost of death. As an atheist I still get choked up when I see a sacrifice for another human/dog. So, would it change?
He also said "the undiscovered country, from whose bourn no traveller returns". (Curious because the play starts with him talking to his father's ghost.) I think he was struggling with his beliefs and that struggle was putting him into analysis paralysis ("thus the native hue of Resolution Is sicklied o'er, with the pale cast of Thought." ). Many avoid the struggle. Many who struggle come out with their faith reaffirmed. Is that cowardice or comfort?
"Whether 'tis nobler to suffer the slings and arrows of outrageous fortune, or to take arms against a sea of troubles and by opposing end them."
I think suicide is a valid response to life, but one that shouldn't be made lightly.
Is there a rational justification for suicide?
@Sheitelhau I'd say there is, when life becomes unbearable for any of various reasons: terminal illness that progressively destroys the body and/or the mind; chronic, agonizing pain; ongoing tortured imprisonment. I think under any of those circumstances, among others, it is a rational decision.