Perhaps the world's most famous mental patient, Hamlet's sanity has been argued over by countless learned scholars for hundreds of years. As a mere student of advanced-level English Literature, I doubt I can add anything new to the debate in 2000 words, but I can look at the evidence supporting or dispelling each argument and come to my own conclusion.
Hamlet is obviously experiencing grief and despair right from the beginning of the novel, with the death of his father and his uncle's seizure of the throne and rapid weddign of Hamlet's mother, and we can observe his great grief bordering on irrational suicidal tendencies as early as Act II Sc I, where he gives his first soliloquy. He cries:
"O that this too too solid flesh would melt,
Thaw, and resolve itself into a dew!
Or that the Everlasting had not fixed
His canon 'gainst self-slaughter!"
Macbeth wants his flesh to dissolve into a dew ("solid" contrasting with "melt" in the first line), and wishes that God had not forbade suicides from going to heaven. This is also the first glimpse of another recurring theme in the play, that of Hamlet's unhealthy obsession with the afterlife. This is one of the reasons that the ghost of his father has such an effect on him, which is a trigger for all the subsequent events in the play.
Moving on to the fourth scene, the next interesting speech is on l. 23. It is a long and complicated speech, but its general gist is that if a person has one fault, no matter how virtuous they may be in other ways, they are soiled by "the stamp of one defect". This speech is quite ironic, because it is Hamlet's "one defect" (his hesitancy and inability to take action), regardless of his other qualities (such as honour and integrity), will be the main reason why the play ends so tragically.
Although we are supposed to suspect that "something is rotten in the state of Denmark", as Horatio puts it, from the start of the play, it is only when Hamlet talks with the ghost of his father in Act I Sc V that we realise the full extent of his uncle's treachery. When he first sees the ghost, Horatio and Marcellus try to restrain him, Horatio saying:
"What if it tempt you toward the flood, my lord,
Or to the dreadful summit of the cliff
That beetles o'er his base into the sea,
And there assume some other horrible form,
Which might deprive your sovereignty of reason,
And draw you into madness?"
Horatio is afraid that the ghost will get Hamlet to follow him to a cliff hanging over the sea, and then change into some other apparition, making Hamlet lose his mind and his sovereign power of reason.
These words are very ironic, for as a result of seeing the ghost and hearing the dreadful truth about his father's murder and mother's adultery Hamlet says he will put on an "antic disposition", telling the others that he will act oddly, but that they musn't tell anyone why he is doing so. Hamlet has already told us that he is a man of thought rather than action (earlier in the play he says that Claudius is as different to his father "as I to Hercules"), and he is going to act oddly so that the King doesn't suspect Hamlet is plotting his downfall. However, Horatio and Marcellus even now think that Hamlet is acting rather strangely, saying "These are wild and whirling words, my lord", and "this is wondrous strange".
The next passage of interest is in Act II Sc II, when Claudius says to his Rozencrantz and Guildenstern:
"... Something have you heard
Of Hamlet's transformation; so call it,
Since nor th' exterior nor the inward man
Resembles that it was."
Claudius is keen to talk of Hamlet's rumoured madness, because he thinks Hamlet might know something about his treachery and wants to deflect his guilt and detract from Hamlet's credibility. To the audience, who have already heard the ghost's speech, Claudius seems to be going over the top, saying that he can't imagine what has rendered Hamlet mad and going back to childhood reminisces. This is similar to one of Shakespeare's other tragedies, Macbeth, where Macbeth goes weaves all sorts of flowery expressions of grief over a king he himself killed.
In this act, we do not see Hamlet much but are gradually introduced by others to the notion that he is mad. Different people give different reasons - Polonius says "... I have found // the very cause of Hamlet's lunacy". The Queen thinks that the only reason is "His father's death, and our o'erhasty marriage", whereas Polonius thinks it is because his daughter rejected Hamlet, after he himself ordered her to: "I will be brief :Thy noble son is mad. // Mad I call it." But by the end of the act, a hint of doubt over Hamlet's sanity will be ingrained in the audience's mind.
The first time we see Hamlet after he decides to put on his "antic disposition" is later in the scene, when Polonius is sent to find out what he can about him. Hamlet comes on, and, using his antic disposition as cover, ridicules him:
Polonius: Do you know me, my lord?
Hamlet: Excellent well; you are a fishmonger.
Poloniuse: Not I, my lord.
Hamlet: Then I would you were so honest a man.
Polonius: Honest, my lord?
Hamlet: Ay, sir; to be honest, as this world goes, is to be one man picked out of ten thousand.
Polonius: That's very true, my lord.
Hamlet: For if the sun breed maggots in a dead dog, being a good kissing carrion...Have you a daughter?
Polonius: I have, my lord.
Hamlet: Let her not walk i' th' sun. Conception is a blessing, but not as your daughter can concieve. - Friend, look to't.
Even so, there is a purpose behind his ridicule - in this passage he refers to Polonius' daughter, and later he mocks Polonius' age. Polonius realises this: "Though this be madness, yet there is method in't". But Hamlet has confirmed Polonius' suspicions about his daughter being responsible for Hamlet's descent into madness for him. Immediately afterwards, when Rosencrantz and Guildenstern come to talk to him, he mocks them also, and tells them that "I am but mad north-north-west; when the wind is southernly I know a hawk from a handsaw", making sure they go back to the King reporting that he is mad - however, it should be noted that he is perceptive enough to realise that they are merely the King's puppets, and has told them just what they wanted to hear.
The next scene to look at is Act III Sc I. Rosencrantz and Guildenstern are reporting back to the King. He asks:
"And can you, by no drift of circumstance,
Get from him why he puts on this confusion,
Grating so harshly all his days of quiet
With turbulent and dangerous lunacy?
Claudius is desperate to find out why Hamlet is mad, for he is afraid that Hamlet might have discovered his regicide. Rozencrantz and Guildenstern say that Hamlet was eager to ask questions, but not so eager to reply. "This is a crafty madness," said Guildenstern: they seem to realise that Hamlet has some purpose to his madness, but they can't figure out what it is.
Later in the scene, when Ophelia speaks with Hamlet as Claudius and Polonius listen from behind the arras, Hamlet repeatedly commands her to go to a nunnery, where she will never be able to marry. I think that this is partially to try and protect her from the carnage that Hamlet must suspect will ensue when he eventually takes his revenge, but it is of course interpreted as the ravings of a madman. Ophelia says "O, what a noble mind is here o'erthrown! // The courtier's, soldier's, scholar's eye, tongue, sword... Blasted with ecstasy", showing that Hamlet has convinced her about his madness. However, Claudius now regognises Hamlet's method ("...what he spake, though it lacked form a little, // Was not like madness."). He recognises the danger and orders that Hamlet be despatched to England, safely out of the way. He ends the scene by saying "It shall be so; // Madness in great ones must not unwatched go". Especially if you happened to have killed their fathers and committed adultery with their wives.
The next scene is the play's performance. Hamlet has asked the players to alter The Murder Of Gonzago slightly so it reflects the circumstances of his father's murder, to see Claudius' reaction. Hamlet, true to form, acts oddly, this time making suggestive comments to Ophelia. Both Hamlet and Horatio see the King's shocked reaction to the spoken play, and Hamlet at last decides he must take action.
Polonius tries the same trick as he did with Ophelia in the next scene, but this time using Gertrude as bait. Hamlet comes to speak with her and scolds her terribly, then hears Polonius behind the arras and kills him, thinking he was Claudius. He then is angry that he didn't kill the King, and he is so frenzied that the ghost comes in to remind him not to harm his mother. When he starts talking to the ghost his mother is finally convinced that he has lost his sanity, and says "alas, he's mad." She must be quite frightened by this stage, with Hamlet adamant that he saw a ghost. "This is the very coinage of your brain;//This bodiless creation ecstasy // is very cunning in." (madness is very good at creating these apparitions), says his mother, who was the last person to believe that Hamlet is mad. Hamlet replies:
"... It is not madness
That I have uttered; bring me to the test,
And I the matter will re-word which madness
Would gambol from."
He retorts that he cannot be mad, for he can repeat the substance of what has taken place which madness would not. "...I essentially am not in madness, // but mad in craft." He tells Gertrude there about the antic disposition he has been putting on, and she seems to believe him. However, when she reports back to the King she says that "Hamlet in madness hath Polonius slain", and that he is "mad as the sea and wind", although it could well be that she is just trying to excuse him from his action and doesn't really believe that he is mad. We then learn of Ophelia's descent into madness, then suicide.
The last evidence to consider is Hamlet and Laertes fight in Ophelia's grave. All the onlookers are shocked by the spectacle - "This is mere madness; // and thus awhile the fit will work on him" His mother says, trying to protect him.
So is Hamlet mad? I think if you consider all the evidence, the only conclusion one can safely come to is that he could not have been mad. Claudius was eager to prove that Hamlet was mad in order to cast a shadow on any accusations of foul play Hamlet might make, and Hamlet was eager to act as if he was mad in order to get closer to Claudius so he could take his revenge for his father's murder, although he was not eager enough to take revenge when Claudius was praying, which probably would have prevented all the carnage at the end, because of his fascination with the afterlife and belief that Claudius would go straight to heaven. But although Hamlet was full of grief for his father and anger towards his uncle and mother, it was not enough to drive him to madness. Hamlet's is a thoughtful, calculating personality, not prone to rash acts, and I think that this was the case here - he could not have been mad.
Source: Essay UK - http://www.essay.uk.com/coursework/is-hamlet-mad-.php