"Within this maze, Shakespeare forces Hamlet to wrestle with a series of ethical problems that he must resolve before he can act—and it is this, more than overintellectualizing (as Coleridge had it) an Oedipal complex (as Freud urged) that accounts for Hamlet’s delay. The soliloquies restlessly return to these conflicts, which climax in, “To be or not to be”: in a world that feels so “weary, stale, flat, and unprofitable,” is it better to live or die? And is the fear of what awaits him in the next world enough to offset the urge to commit suicide? Is the Ghost come from purgatory to warn him or should he see this visitation in a Protestant light (for Protestants didn’t believe in purgatory) as a devil who will exploit his melancholy and “abuses me to damn me”? (2.2.603). Is revenge a human or a divine prerogative? Is it right to kill Claudius at his prayers, even if this means sending his shriven soul to heaven? When, if ever, is killing a tyrant justified—and does the failure to do so invite damnation?"
A Year in the Life of William Shakespeare: 1599 by James Shapiro