You could ask yourself if Shakespeare was insinuating that women are weak (Frailty, thy name is woman!) by allowing Ophelia to dip into madness which eventually takes her life.
Ophelia can not handle the loss of Hamlet's love, her brother's absence, and her father's death. It is all too much for her and she snaps.
Hamlet, on the other hand, turns his madness on and off depending on the company he keeps. With Horatio, he is never "crazy-mad" but "angry-mad." He always makes sense, though...even in his madness. Polonius comments, "There is method in it".
Hamlet's madness has a purpose. He chooses when and where and what to say in order to get to the meat of Claudius' purpose as well as his mother's.
Ophelia's madness is permanent...not something she willed on herself, but a true result of the stress she suffers in her life.
Hamlet's madness does take him to his death, although he does not plan this. Ophelia's takes her to her unplanned death as well, but she does not fight the inevitability of it as she allows herself to drown.
In the simplest terms, Hamlet's madness comes and goes, Ophelia's does not.
Hamlet tells Horatio in Act 1.5 that he is going "To put an antic disposition on." In other words, he is going to pretend madness. In Act 2.2, Hamlet tells Rosencrantz and Guildenstern that he is mad only on occasion, "I am but mad north-north-west." Later, in Act 3.4, Hamlet tells his mother that he "essentially am not in madness / But mad in craft."
Ophelia, on the other hand, tells no one that she is "mad"; she comes to see the Queen in Act 4.5 and her gentlewoman tells Gertrude that Ophelia is "importunate, indeed distract: / Her mood will needs be pitied." The gentlewoman is saying that Ophelia is emotionally distraught and deserving of royal pity and attention because the Queen has said she will not speak with her. When Ophelia comes into the room, she is singing snatches of songs.
Later, Ophelia returns when Laertes is there and sings some more song snippets and hands out flowers and herbs. Then, in Act 4.7, Laertes says to Claudius that he's lost his father to death and his sister to psychological desperation: "A sister driven into desperate terms." Toward the end of that scene, Gertrude tells Laertes of Ophelia's death, of how she fell into the water while trying to get some flowers and of how she seemed incapable of saving herself.
In summary, Ophelia's madness seems complete because it is spontaneous and witnessed by others while Hamlet's is planned and questioned by others throughout the play.
i think that shakespeare was a bit sexist as ophelias madness is too exaggerated and over-the-top with her actions and childish singing. Even Claudius says to hamlet at the beginning of the play "everyone loses a father" Why does Shakespeare single ophelia out when everyone goes through these emotions and stressful times?