It demonstrates his instability and suicidal thoughts. Hamlet's growing sense of melancholy and disgust is a result of two horrific events. In the monologue, he contemplates whether or not he should continue or end his own life.
Living is a passive state; dying is an active state. One of these allusions is when he compares the love his late father had for his mother to Hyperion to Satyr; this is a reference to the sun god and his affections.
When Hamlet speaks in these soliloquies he is always his true self; never pretending to be mad or taking on a superficial way of talking as he did at times in dialogue with others. O, vengeance! I all: No, to sleepe, to dreame, I mary there is goes, For in that dreame of death, when we awake, And borne before an everlasting Judge, From whence no passenger ever returned, The undiscovered country, at whose sight The happy smile, and the accursed damn'd, But for this, the joyfull hope of this, Whol'd beare the scornes and flattery of the world, Scorned by the right rich, the rich curssed of the poore?
This clearly shows the audience that his heart is breaking not only for the loss of affections towards his mother but the fact that she does not seem to care about this loss. The big question that Hamlet is trying to answer for himself during the course of this soliloquy is whether or not it is noble to take up arms and die defending what you believe is right.