Perhaps one example of comic aspects of madness is Shakespeare's tragic play Macbeth. While some may not agree on what can be deemed comic, there are certainly aspects of the play where madness is relevant and certain individuals can find humor in the act.
For example, one could certainly name the Porter in the play as mad. While some could say that it is his drunkenness which explains his behavior (calling Inverness hell and alluding that Macbeth is the devil), others could easily state that he is quite mad.
Another example of comedy in madness can be seen in Lady Macbeth's behavior when sleepwalking. Lady Macbeth's guilt has finally caught up with her and has manifested in a "spot" on her hand. One could easily find her scrubbing away at the spot humorous based upon the fact that the spot does not really exist.
One last example of humor in madness can be found in Macbeth's behavior and statement during his celebration dinner. Banquo, recently killed by hired murderers, appears at Macbeth's table. Macbeth's behavior becomes very "womanlike" and his manhood only returns when the ghost has vanished.
I am a man again.
One could easily find humor in the fact that Macbeth begins to act like a woman when he sees Banquo's ghost.