In Act 4 of Shakespeare's Hamlet, the defining theme is the descent into madness. In Scene 1, Gertrude reports that Hamlet appears to be quite insane:
[Hamlet is] Mad as the sea and wind when both contend
Which is the mightier. In his lawless fit,
Behind the arras hearing something stir,
Whips out his rapier, cries 'A rat, a rat!'
And in this brainish apprehension kills
The unseen good old man. (7-12)
This is unsettling for Claudius as he realizes that if he had been behind the curtain in Gertrude's room, he would now be dead, as Hamlet intended.
In Scene 2, Hamlet seems equally insane as he refuses to tell where he has hidden Polonius's body. Then he calls Rosencrantz a "sponge:"
Take you me for a sponge, my lord? (15)
Hamlet responds in his clever, seemingly "crazy" way:
Ay, sir; that soaks up the King's countenance, his
rewards, his authorities. But such officers do the King best
service in the end. He keeps them, like an ape, in the corner
of his jaw; first mouth'd, to be last swallowed. When he
needs what you have glean'd, it is but squeezing you and,
sponge, you shall be dry again. (16-21)
He tells his school "friend" that he is like a sponge in that the king can use him to soaks up information. He will be valuable only while he has something of worth to give Claudius. After that, he will be useless and "swallowed."
In Scene 3, Hamlet's "madness" borders intentionally on insolence:
Where is Polonius?
In heaven. Send thither to see. If your messenger
find him not there, seek him i' the other place yourself. (35-37)
In answering Claudius, Hamlet says that Polonius is in heaven, but that if the King's messenger cannot find him there, Claudius should look for him in hell himself. In other words, Hamlet is telling Claudius to go to hell.
In Scene 5, Claudius comments on Ophelia's decent into madness, asking that she be watched and protected:
Follow her close; give her good watch, I pray you.
O, this is the poison of deep grief; it springs
All from her father's death.
Scene 6 contains a letter delivered to Horatio from Hamlet about Claudius's attempt to have Hamlet murdered in England. It is a sort of "madness" that the king is willing to kill his stepson to protect himself.
In Scene 7, Laertes returns to news of his father's murder; from "the very sickness in [his] heart," also a kind of madness, Polonius's son wants to kill Hamlet:
The rather, if you could devise it so
That I might be the organ. (75)