Concerning the two speeches you refer to from two different acts of Shakespeare's Hamlet, it sounds like you have a pretty good handle on what Hamlet is saying in the first speech, but maybe not such a good handle on what Hamlet is saying in the second.
Hamlet is depressed in Act 2.2. He is suffering from the death of his father and the hasty remarriage of his mother to his uncle. Shakespeare apparently understood many aspects of what we now call psychology, and his presentation of Hamlet here demonstrates one such aspect. Hamlet amplifies his own feelings and situations and applies them to Scotland and the world. In other words, he sees his situation as indicative and reflective of the state of existence. Everything is rotten, not just his situation. That is the gist of what he says in Act 2.2.
In Act 2.4, he's simply expaining to Horatio the partying that his uncle is doing. When he mentions his mind, he is just saying the equivalent of "To my way of thinking," or "As I see it." He explains how heavy drinking hurts Denmark's reputation, etc.
The speeches aren't directly related. One thing they do have in common, though, is that they show Hamlet's dislike of his uncle.
Hamlet refers to himself as a first person. In act one scene two hamlet, was taking about flesh melting and it thawing intodew, it everlasting and self slauger. He also talked about god,being weary seamed to all the uses of the world. an unweeded garden that grows a seed. this ranks and gross in nature. Like Niobe, all tears , why she? In Act 1 scene 4 he is talking abouthis mind and marry and drunkards and soil to his own scandal.