The first example is in Act II, scene ii. Hamlet meets Polonius and Ophelia, and tells Polonius not to let his daughter go out in the sun because it breeds "maggots in a dead dog"(II, ii, l.179). Hamlet is suggesting that Ophelia being exposed to the world (i.e., him) will cause her to become tainted/corrupted/desecrated... like a decompsing dead animal.
In speaking with Rosencrantz and Guildenstern, Hamlet begins to build his perspective on meaning of the life that will come to a climax with his speech over Yorick's head in Act V. Her in Act II, however, he simply makes reference to the the earth and air around him as being "no other thing to me than a foul and pestilent congregation of vapours." Pestilent implying a diseased and dying world. He ends by stating that all his surroundings are the "quintessence of dust". Te be dust is to have decomposed fully.
Hamlet is the most introspective of Shakespeare's tragic heros, and possibly the most depressed. He sees decay and corruption only in the world around him, and struggles internally to find meaning for the actions of humans... but fails.