I personally do not think mental illness should be a case for lower or no sentences based on a crime. If the person committed the crime it should matter if they have a mental illness. Prisons provide medical care to a certain degree and if they did something that is deserving of a sentence, then they should clearly go to prison.
Overall I believe that if a person can prove that a mental illness caused a outburst of aggression then that should be factored in when determining an appropriate punishment, I don't believe we should punish someone for an act that they did not deliberately chose to make, I believe we should be more compassionate when dealing with mental illnesses.
So for instance psychosis causing aggression through voices in one's head I would punish less severely. In fact then I'd send him to the insane asylum instead.
However, say someone is bipolar and they are having a bad day. They can't help how they feel but that doesn't mean they can't help committing a crime. Instead of punching someone they could've recognized they were in one of their episodes and went and pounded a pillow or called a therapist to talk to. Or they could at least scream and shout obscenities instead of punching someone. So then I could see a lighter sentence for disturbing the peace due to shouting obscenities in a public place if the person was redirecting their feelings of rage instead of getting physically violent. But that's about it.
No, I don't think a person with mental illnesses should be less punished for acts of aggression. Just because a person have a mental illness doesn't mean that person is aggressive. A person with a mental illness could have just as much thought about what they are doing then a person who doesn't.
I do not believe that people with mental illnesses should be punished less for acts of aggression than other people. I do not see mental illness as an excuse for somebody to be able to commit a crime. I think that everybody should be punished the same regardless of the mental state.