Malvolio should probably be the starting point for any exploration of madness within the play. The sub-plot of the play and the 'letter trick' are designed by Toby and Maria to make Olivia think Malvolio is mad: prancing around, blowing kisses, in his yellow stockings, it seems a good diagnosis. 'This is very midsummer madness', Olivia says in the scene.
Yet Malvolio is NOT mad - but in love with Olivia. Olivia says herself in a later scene 'I am as mad as he [Malvolio] if sad and merry madness equal be'. Olivia, of course, in love with 'Cesario' (actually a girl, Viola, in disguise) is, like Malvolio, fooled into falling in love, which explains her hugely unusual behaviour towards Cesario, who is, after all, only a servant.
Look too at what Feste says when reading the letter to Olivia in the final scene: his crazed delivery of the text is not madness itslef, but just reading madness. That is, Feste only speaks the words that a supposed madman has written down - but does that (could that?) make you mad? Is an actor mad just for speaking the lines of a mad character?
Few people would argue that, but it makes the point that Twelfth Night dwells on: that madness is threaded through every day life, and boundly close up with 'sane' behaviour. Perhaps, as Romeo says in Romeo and Juliet, it is love which is 'a madness most discreet' in 'Twelfth Night'.