HAMLET. As I perchance hereafter shall think meet
To put an antic disposition on— (1.5.191–192)
Hamlet's madness? He's faking it. At least that's how hit appears at first in Shakespeare's Hamlet, but it remains to be seen during the rest of the play if that statement holds true.
There's no indication in the play prior to Hamlet's "I'm going to feign madness" statement made in confidence to Horatio, Marcellus, and Bernardo in act 1, scene 5, that Hamlet is mad or that he has any particularly propensity for madness.
It might well have been Horatio who planted the seed of feigning madness into Hamlet's mind during the prior scene in which the Ghost of Hamlet's father first appears to them. Horatio warns Hamlet against following the Ghost away from the protection of his friends:
HORATIO. 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...
(The entire section contains 3 answers and 1635 words.)