In Shakespeare's Hamlet, Hamlet himself raises the issue of madness when he tells Horatio that he will "...put an antic disposition on" (I.v): act insane. This is part of his plan to get revenge. His act is convincing, as seen from Claudius's famous line: "Madness in great ones must not unwatched go." The Queen also considers Hamlet mad. When asked how Hamlet is she replies:
Mad as the sea and wind when both contend
Which is the mightier....(Iv.i)
Two issues confuse the question of Hamlet's madness, however. One, is he pretending to be mad throughout the play, or does he actually cross over into madness at some point in the play? Second, Hamlet is certainly depressed or melancholic in the play. How does this depression relate to what the characters refer to as "madness"?
I would say that there are a lot of quotes that can show how Hamlet appears to be mad. The first one I can think of comes when he sees Polonius and says Polonius is a fishmonger. He follows that up by telling Polonius not to let his daughter walk in the sun for fear she'll become pregnant.
Then, when he talks to Ophelia, he says nonsensical things at times and he contradicts himself. He tells her in one breath that he used to love her and in the next he tells her that he did not.
My favorite quote about his madness, though, is one where he seems to be saying he is not crazy. That is the one where he says that, when the wind is blowing from the correct direction, he can tell the difference between a "hawk and a handsaw."