Take a look at the ingenious mind of Edgar Allan Poe. Without him, we wouldn't have the Great Detective Sherlock Holmes. He is given credit for creating the first modern detective story by Sir Arthur Conan Doyle himself. Poe's mental illness of being a manic depressive allowed him to create the melancholy poetry and insanely crazy, creative, amazing stories that people of all ages are able to enjoy. I personally have never been more interested in anyones pieces of literature but that's just my preference. Most of his works have these deep-seeded feelings within in them that only the human life could ever experience. Yes, you could make the arguement that people who are severely menatlly ill couldn't inspire creativity, but they can. They inspire plenty of people everyday to do amazing, creative things everyday. Maybe some people can't see that people with diseases such as Autism or Alzheimer's help peole without these diseases see how much life really counts. It sounds terrible but it's true, sadly.
Old "mental illnesses" included "drapetomania"(Runaway Slave Syndrome), and neurasthenia which is now thought to encompass some things that were really physical illness. Think about that people 100 years ago identified things we now think of as just "physical" as "emotional". The problem with "mental illness" is they make it sound so scientific, even pointing out physical differences, and in all of it it people forget how subjective it really is to put judgements on other people's thoughts and experiences and even to a degree one's own since you may feel differently about how you feel now looking back.
Why should unhappiness or any so-called "negative" emotion automatically be equated with illness? Because it looks different in the brain? So what? We'd expect that with any variation in thought or feeling regardless of the reason. Anytime someone goes in to be diagnosed with a "mental illness" they should be asked to consider the overall effect of how they think and feel on their life. If you are functioning and overall moving in a positive direction in your life, you're not mentally ill even if you fit the signs. Sometimes feeling blue is how we need to feel to go through certain issues, people commit suicide because they take their blues too seriously. Even if the person is ill there whole individual mind should be considered to help them function, so a depressed individual in one case may actually do better learning to be or medicated to be functionally depressed, the depression may just be the appropriate response to something in their life and the person just needs to learn to keep their appreciation of life through their depression. The purpose of psychology is supposed to be to help people understand their minds and function better mentally, not to make us all ignorantly happy. There are higher more important things than happiness. People who are happy all the time but never actually think about things and uncritically follow their emotional impulses ought to be considered mentally ill. And that does impact function. We see that every election cycle, we see that in businesses with short-term impulsive aims with no respect to the long-term big picture.
People take "negative" in negative emotion too literally. It's still part of your experience and you may learn from it and appreciate it. The increased tendency towards emotionalism in American life leads people to even get emotional about their emotions not realizing they will have better emotions if they instead think about their emotions and whether they actually make sense for the situation(and whether there is more to learn about the situation), whether they serve themselves and considering their impact on others, not trying to do this perfectly but just keeping it in mind.
On occasion mental illness can help to inspire creativity. People with mental illness have the ability to see things that others can not see. Their minds also function in a different way that perhaps makes people with mental illness more creative. This seems to be especially true of people with Bi-polar disorder. On the other hand, it does not always occur, and sometimes what appears to others to be creative is just someone's insanity.
Evolutionary biologists have begun arguing that depression can help people reflect on their problems, leading to solutions, which is why humans have adapted to experience depression. A large number of artists have been seen to experience mental illness. I do not think it automatically leads to creativity, but there appears to be a causal link that needs to be further investigated.
I think for people with mental illnesses, they are more creative because it is an outlet. It is a way of expressing who they are and the things they are feeling and getting their thoughts out when they may otherwise have a hard me of it. Mental illnesses are tough to deal with, and through creative outlets, those who struggle with them are able to cope better.
If someone is autistic, you can never know fully what it going through their mind and they can not fully convey it. So how would you know if that person is thinking up the next famous movie plot, or a thrilling mystery book, or envisioning a masterpiece if they can not convey it. It would not be that way in every case of course but to say that mental illness impairs creativity is like saying that losing a limb impairs the ability to wrestle when a man born with no arms or legs can wrestle better then many.