Madness is hard to identify, due to the fact that derangement of the mind has many different origins; especially in Hamlet's case. Shakespeare uses the structure of Hamlet and Ophelia's verbal and written expression to validate their madness. As the play progresses Hamlet dwells deeper and deeper into his feigned madness but still manages to maintain analytical reasoning and his integrity. On the other hand Hamlet's foil in the outlook of madness, Ophelia, is torn to pieces due to the fact that she has nothing to relieve her thoughts of her father's murder. We can validate the "realness" of Hamlet and Ophelia's madness by the different forms of communication with which they use in order to interact with the others around them.
All aspects of Hamlet's disposition leads to him not being insane, his sanity is most vividly displayed in his "to be or not to be" soliloquy; Where Hamlet detaches himself from his current situation in order to construe humanity as a whole. He starts by contemplating why people live for the simple fact that they fear that the afterlife will be worse, contrasting what he can control and what he cannot, one being his presence in the world the other Ophelia's love. He knew he had to either passively and let it control him or take action, hence displaying his ability to still be able to reason, a sure sign of a sane man. Shakespeare uses antithesis in the "to be or not to be" soliloquy in order to reinforce the idea that life is choice. Hamlet concludes his soliloquy by stating that: "Thus conscience does make cowards of us all and thus the native hue of resolution / is sicklied o'er with the pale cast of thought."(3.1.83-85) Where Shakespeare uses a poetic and transcendental tone in order to build Hamlet's persona, to not only keep his intentions away from Claudius but the reader also. He also clarified that he is not mad through spoken word; When Rosencrantz and Guildenstern ask Hamlet what his "uncle-father and aunt-mother" are deceived about Hamlet answers "I am but mad north-north-west. When the wind is southerly, I know a hawk from a handsaw." (2.2.368-369) Even though some people believe that the murder of Polonius is an affirmation off Hamlet's madness, but he embodied such actions even before figuring out the truth about his father, in the scene where he hastily decides to go after the ghost, where no one was able to change his mind:
But Hamlet's feigned madness is far more than just an allusion; it manifests itself in the relationship which connects Hamlet to whoever is trying to decipher the "cause of his distemper". This is another clue that Hamlet is not mad, when even his closest colleagues could not understand the origins of his behavior. Rosencrantz and Guildenstern think it's because he is far to ambition for the state he is in now, his mother thinks it's because of her hasty remarriage, Polonius thinks it's because of Ophelia, Claudius is the only person able to see through the façade Hamlet has put up, due to the fact that he is the only one with something to fear. He's also the only other character with something of his own to hide giving him a better vantage point to spot Hamlet's tricks. Shakespeare depicts his character simply as oxymoron, displaying Claudius as two faced.
Ophelia's songs depict everything we need to know about her sudden madness and the source of it. She is illustrating her true emotions through an irregular diction similar to Hamlet poorly written letters, in the sense that they are both genuine, and both a portrayal of their true emotions. Ophelia's discourse is not only a routine of her madness but the telling of her memoir, detailing the origins of madness. Ophelia being the only one to descend into real madness displays the image of an oppressed woman during the Elizabethan era. She cared too much about pleasing others and thought too little about herself, this being the reason of her sudden madness and consequently her death. Unlike Gertrude she is unable to discard family values and her feminism in order to survive in a world ruled by men. Ophelia's worth quickly deteriorated alongside her sanity. As stated by the queen she was torn from her "melodious lay" into her "muddy death", she links the image of her drowning as "melodious", implying that she enjoyed watching her struggle. (4.7.178-184)
In Hamlet's case he seems to have the perfect balance of the well-being of others and his own goals; Instead of singing Hamlet uses his scholarly writing ability as a sort of outlet to contain his madness. When the going gets tough he writes a letter or two, as sort of promise to himself and to others, not only to seem as though he is a good prince but to keep him on track on to becoming a better son and fulfilling his long term goal of avenging his father death. In the Elizabethan era women were not allowed to attend University (or any school for that matter), couldn't vote in politically or even same the position of heir to their father's title. Which are more reasons Ophelia descended into madness so quickly, while her brother was in France enjoying himself she was left to morn and worry about her father's death all alone, with no purpose to live and no one to blame.
"His means of death, his obscure funeral -
No trophy, sword, nor hatchment o'er his bones,
No noble rite nor formal ostentation. "(4.5.209-213)
The most distinguishing difference between Hamlet's and Ophelia's madness is their deaths, in particular the few moments before each of their deaths truly defines their state of mind and their overall character. Ophelia's left everything out in the open through her songs, as for Hamlet he stayed concealed until the very end not allowing anyone to glance at what he was really feeling, even after dying his final words where: "the rest is silence" (5.2.351) Shakespeare depicts Hamlets character by a fragmented and perplexing diction making the reader anticipate Hamlet's next move. As Niccolo Machiavelli said "No enterprise is more likely to succeed than one concealed from the enemy until it is ripe for execution."
The syntax which Shakespeare uses is what divides Hamlet's feigned madness from Ophelia's genuine madness. Ophelia's songs where directed to everyone leaving with nothing hidden, including her madness. As for Hamlet's letters they were quite personal leaving the decoding of the message to the reader. Very much the same ending Shakespeare leaves for his readers.