At the end of Act III, Gertrude is convinced that her son is mad after seeing him talk to a ghost. However, Hamlet denies that he is mad and blames his behavior on “[her] trespass” or her marriage to Claudius. After asking his mother not to sleep with Claudius, he then asks her not to reveal that he is only pretending to be insane. If Hamlet were truly insane, he probably would not have the foresight to tell his mother not to reveal that he is pretending.

Gertrude agrees to go along with Hamlet's deception and in the next scene she makes good on her promise. She tells Claudius that Hamlet is mad. Both Hamlet and his mother know that Claudius plans to sent Hamlet to England the next day, and Hamlet wants to be able to outsmart his uncle and two friends, Rosencratz and Guildenstern. By allowing them to believe he is crazy, they will not suspect his actions as much as they would if they felt he was sane. They will simply attribute his behavior to insanity and not cunning.

If Hamlet is not mad, he is, by his own declaration "thought-sick." Clearly, with all that has happened, Hamlet suffers from severe melancholia. And, research has shown that psychiatrists today often diagnose patients who are realistic with clinical depression. Hamlet is such a person. For, he is sickened by the reality that his mother has committed an act of perverseness by marrying her brother-in-law who has killed his father: "reason panders will" (III,iv,88). Repulsed by her lack of shame, he tells his mother,"And would it were not so, you are my mother (III,iv,15).

Justly distrustful of Claudius, in Act IV Hamlet feigns madness with the king by answering him in riddles. By doing so, he exemplifies the first line of a poem by Emily Dickinson: "Much madness is divinest sense" since Hamlet wishes to keep the king off guard so that he can later watch his reaction to the trap he sets with a play.