I do think that your suggested body paragraphs will work with the prompt provided. Be sure to remember that your are being asked to consider their madness or their loss of sanity, not their madness as in anger. While no one here at enotes can write the essay for you, here are a few things to think about:
Remember that Hamlet is only pretending to be mad (putting "an antic disposition on"), so his comments to the court especially when he is making fun of Polonious allow him to speak freely about how he feels about the man. You should closely examine Act 2 scene 2. You should also look at his conversation with Claudius in Act 4 scene 3.
Ophelia's madness is likely the result of being verbally reprimanded by Hamlet as seen in the "get thee to a nunnery speech" i Act 3 scene 1 and his killing of her father. In her madness, she sings "crazy" little songs, but the subject of those lyrics possibly reveals how she feels about the death of the her father and more importantly how she she feels sexually used by Hamlet. You should look closely at Act 4 Scene 5. In her craziness she is free to express her disappoint and hurt in Hamet's treatment of her and his behavior.
By reveiwing these key scenes you should be able to find all the evidence you need to write your essay. Good luck!