Hamlet, more than almost any character in literature, hates deception and craves honesty. It is one of the brilliant ironies of the play that Hamlet, an absolutist in his quest for truth, is trapped in a seamy political world where deception is a necessary part of life and political "spin" rules the day. This contrast, fascinating to the audience, is a torment to Hamlet. Deception is necessary for and used by every character in Hamlet, for every purpose ranging from love to parenting to regicide.
Hamlet is miserable in Denmark not just because of his father's death, but because he craves honesty while everyone else around him is engaged in deception and manipulation.
There is justice in Hamlet because every character that practices deception is ultimately punished for doing so, often by his own form of treachery.