Madness Hamlet's originally acts mad (crazy, not angry) to fool people into think he is harmless while probing his father's death and Claudius 's involvement.
Elizabethans believed the human body was made up of four basic elements, called humors: phlegm, blood, yellow bile, and black bile.
HAMLETO, that this too too solid flesh would meltThaw and resolve itself into a dew!Or that the Everlasting had not fix'dHis canon 'gainst self-slaughter! O God! God!How weary, stale, flat and unprofitable,Seem to me all the uses of this world!
After the Ghost tells Hamlet that Claudius has murdered his father, he warns his friends that he will put on an "antic disposition"—i.e., pretend to be a madman.
HAMLETHow strange or odd soe'er I bear myself,As I perchance hereafter shall think meetTo put an antic disposition on
OPHELIAMy lord, as I was sewing in my closet,Lord Hamlet, with his doublet all unbraced;No hat upon his head; his stockings foul'd,Ungarter'd, and down-gyved to his ancle;Pale as his shirt; his knees knocking each other;And with a look so piteous in purportAs if he had been loosed out of hellTo speak of horrors,—he comes before me.
The Ghost always seems to be associated with Hamlet's is-he-or-isn't-he insanity.
[…] The spirit that I have seenMay be the devil: and the devil hath powerTo assume a pleasing shape; yea, and perhapsOut of my weakness and my melancholy,As he is very potent with such spirits,Abuses me to damn me:
KING CLAUDIUSWhat, Gertrude? How does Hamlet?QUEEN GERTRUDEMad as the sea and wind, when both contendWhich 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, killsThe unseen good old man.
CLAUDIUS[…] poor OpheliaDivided from herself and her fair judgment,Without the which we are pictures, or mere beasts: