Madness – both real and feigned – is at the heart of the play. Hamlet's "antic disposition" has famously sparked a scholarly debate: Does Hamlet truly go "mad" or is it all an act? An impossible mystery, it's one of many unanswered questions raised by the play. Nevertheless, the complexity and sheer ambiguity of Hamlet's mental state and erratic behavior is compelling and seems to speak to the play's overall atmosphere of uncertainty and doubt. Ophelia's clear descent into madness (and subsequent drowning) is somewhat of a different issue. Critics tend to agree that Ophelia seemingly cracks under the strain of Hamlet's abuse and the weight of patriarchal forces, which has important implications for the play's portrayal of "Gender" and "Sex."
While Hamlet's "mad" behavior starts out as an "antic disposition," his mental state deteriorates over the course of the play to a point where it would be accurate to call him truly mad.
It's no accident that the play makes it impossible to know whether or not Hamlet is actually "mad" – the audience's uncertainty about Hamlet's mental state mirrors the general ambiguity and doubt that characterizes the entire play.