Essentially, Hamlet's soliloquy reveals an almost existential angst about the human condition. Life is, he muses, characterized by a series of indignities:
For who would bear the whips and scorns of time,
The oppressor's wrong, the proud man's contumely,
The pangs of disprized love, the law's delay,
The insolence of office, and the spurns
That patient merit of the unworthy takes...
What then, makes life worth living? Hamlet takes the bleak view that it is really fear of the unknown. A person would simply commit suicide, or "his quietus make/With a bare bodkin" if they did not fear the possibility that the afterlife might be worse. Death might bring sleep, but it might bring dreams, and this, Hamlet famously observes, is "the rub." So it is not the joy of living, or anything like it, that makes people cling to life, but rather the fact that, as miserable and terrible as it may be, it might be better to bear those ills we have/Than fly to others we know not of." This is, of course, a profoundly bleak statement, but it is difficult to imagine Hamlet responding any differently to the terrible situation he finds himself in. It is probably, then, best read not as an enduring statement by Shakespeare on the human condition, but as a window into how loss, betrayal, and rejection have affected this sensitive, brilliant young man.