Is Hamlet really mad, or is he merely pretending to be mad? Find lines that support your answer in Act IV.
There is plenty of evidence to support the idea that Hamlet is both grieving and laboring under extreme stress, but not "mad."
In Act IV, Scene 2, Hamlet uses a pointed metaphor with Rosencrantz and Guildenstern. He recognizes their duplicity and how they are being used by Claudius and calls them sponges; when Rosencrantz objects, Hamlet answers:
"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 mouthed, to be last swallowed: when he needs what you have gleaned, it is but squeezing you, and, sponge, you shall be dry again."
He spells out for them very clearly how they will be discarded when Claudius gets what he wants from them.
In Scene 3, Hamlet takes on Claudius with some very tricky wordplay. When he is asked where Polonius is, he responds, "at supper", and further elaborates:
"Not where he eats, but where he is eaten: a certain convocation of politic worms are e'en at him. Your worm is your only emperor for diet: we fat all creatures else to fat us, and we fat ourselves for maggots: your fat king and your lean beggar is but variable service, two dishes, but to one table: that's the end."
Hamlet speaks of man's existence in strictly biological terms, but later, in his soliloquy in Scene 4, he speaks compellingly of the gifts of "large discourse" and "god-like reason." We understand that Hamlet does not see our lives as ultimately becoming simply food for worms. He is communicating his contempt for Claudius, implying that he is ultimately no different than any other man--even a lowly beggar. Hamlet understands that we bring meaning and dignity to our lives and legacies by our actions--the kind of philosophical introspection of which a "madman" would not be capable.
Pretending to be mad gives Hamlet the cover, and time, that he needs to work through his doubts and fears.
I would argue that he is not mad, and in fact sees things rather clearly. One great passage that helps to demonstrate his sanity is in his soliloquy while gazing out at Fortinbras' army. He reflects on the very nature of man and man's ability to reason as a great thing, and one not to go unused:
What is a man,(35)
If his chief good and market of his time
Be but to sleep and feed? A beast, no more.
Sure, he that made us with such large discourse,
Looking before and after, gave us not
That capability and godlike reason(40)
To fust in us unused.
I don't think that he would be discoursing at such length about the great capacity of man for reason were he really caught up in a madness himself.
One might also point to his ability to think clearly in the face of discovering the plot for his own murder and to arrange for the letter to find Horatio and to get himself back safely to Elsinore as good demonstrations of his sanity.