The answer to this question will depend a lot on whether you think Hamlet was actually mad in the play or whether it was just a show whilst he was trying to work out what to do about Claudius and gaining his revenge against him. However, even if you believe that Hamlet was not mad, there is the obvious case of madness in the character of Ophelia. I think at the end of the play the audience will probably have a much better understanding of madness and probably a lot more empathy for it, especially having seen first hand how Ophelia became mad as a result of her father being killed by her lover. Who can watch Act IV scene 5 without feeling sorry for Ophelia as she hands out herbs and comments on her father's death in her distracted state? Consider the following quote:
Oh, you must wear your rue with a difference. There's a daisy, I would give you some violets, but they wither'd all when my fahter died: they say, he made a good end...
Thus by the end of the play we have seen at least one character descend into madness and suffer greatly as a result, heightening our own understanding and awareness of madness and giving us greater empathy for those who suffer from insanity.