There can be no monolithic answer to this question, because mental illness is not portrayed by the media in any one particular way. Portrayals of mental illness run the gamut. With that said, if I were to give a general impression, I would say that the media has been much more sympathetic to the issue of mental illness in the last twenty years or so.
Part of the reason for this is because we are more enlightened about mental illness. There is not much of a phobia today. For example, there was a hit on prime time television, Life Goes On and it was about life with Down syndrome, played by Chris Bruke, who actually has Down syndrome. It aired from 1989-1993. This show was groundbreaking, because it not only portrayed the life of someone with Down syndrome, but it also had a Down syndrome actor who did an amazing job. Talk about form and content.
More recently, many shows about law and crime investigation (Criminal Minds), and the supernatural blur the distinction between what is means to be mentally well and ill.