The first nine lines ring the changes on Hamlet’s disgust with the apparent injustice and rankness of the world in general, of which his present situation is an example.
The next eight lines testify to the former king’s nobility and love of Gertrude, and begin the unfavorable comparison to the present king, the usurper.
The final lines express the inappropriateness of the relation between Gertrude and Claudius.
In terms of theme, Hamlet is expressing (to himself) his melancholy at the loss of his father and his contemplation of suicide as the only way out of his misery (while at the same time Shakespeare is telling the audience the "exposition", the events precipitating the present drama.) Since this soliloquy is early in the play, his inability to act is only suggested (“But break, my heart, for I must hold my tongue.”); the fact that Shakespeare put this passage in soliloquy form is a testament to his genius. Hamlet must “hold my tongue,” so this emotional reaction to the speed and inappropriateness of the liaison cannot be voiced to another character (such as Horatio).
The imagery used in describing Gertrude’s relationship with Claudius is dark, unapproving, and carnal (“incestuous sheets”). Added to this tone is the disgust at the “speed” of the new liaison which he sees as disrespectful of his father’s memory (even though necessitated by the need for continuous strong leadership in the kingdom).
When looking for patterns of figurative language, it must be remembered that many of the lines are suspect. For example, “solid flesh” was probably “sullied flesh.” The point is that early editors forced imagery onto the soliloquy that Shakespeare may not have intended. But plays on words, such as cannon and “canons ‘gainst self-slaughter” and “a dew” (adieu”) were deliberate.
Finally the entire soliloquy serves to introduce the question of the solidity of a body --"she would hang on him," etc.-- vs. the ghost-like apparition about to appear, which has no solidity and may be only a product of Hamlet's grief.