The TV and movie emphasis, and therefore the conventional wisdom, is that people with a mental illness are more likely to commit violent crimes.
The actual answer is that there is only indirect causation. Some illnesses lead to a slight increase in violence (mania, autism) - almost entirely reactive rather than planned violence - and some result in much lower rates of violent crime. There are two additional ways in which illness affects the rate of violence. Increased substance abuse leads to increased crime; there are higher rates of substance abuse associated with mental illness. So if the illness is leading to more SA, then there will be higher crime. Next, lack of income means that mentally ill people live in worse, more violent neighborhoods. We tend to revert to level of acceptable violence around us anyway, and being surrounded by violent and intimidating people gives more opportunity for violent response.
But if one factors out the substance abuse and the neighborhood, those with psychiatric illnesses actually have a lower rate of violent crime than the general population. That doesn't make for good movies with frightening psychopaths or mad scientists, but it is true nonetheless.
I'll have more to say on this.