If you never watched the Robin Williams movie "Patch Adams," you should.
Not to spoil if, now that I told you to watch it ...

Let's just say, it drives home the point that, even though we might notice signs of mental illness and instability, it's in our nature to want to try and fix that person. The reality is, while symptoms can be controlled, the underlying disease is always there.
Do all mentally ill people turn to violence? No. So, as hard as it is to diagnose illness to begin with, it's even more difficult to predict the subsequent behavior -- ESPECIALLY when the patient is prescribed psychotropic meds.
I personally have been around a few people who had mental illnesses. Most were very happy, easy to talk to souls with an obviously skewed view of reality. One was very troubled, and she committed suicide after graduating HS, being married and having a daughter. Others in high school knew she has issues, but I didn't know until after her death. Another girl I dated once committed suicide just before her high school senior year.
It's always after the event we sit back and try to second guess ourselves. Could we have picked up on a clue that would have prevented a tragedy? And, if we preemptively institutionalize a class of people because they might be dangerous, are we violating their human rights, or protecting the rights of the rest of society to not live among possibly dangerous people?
One thing we should strive for is to separate the gun issue from the mental illness issue. We need to work on combating the underlying problem in ALL areas of our laws.
Should the mentally ill be allowed to:
- drive
- use power tools
- use knives
- use guns
- mange their own finances
- enter into contracts
- have or be around children unsupervised
- live alone
and so on. There are lots of laws on the books that protect the mentally incompetent from making contracts, etc. But, there are no laws that say we can lock them up BEFORE they hurt themselves or someone else. By then, it's too late. Look at Susan Smith, Son of Sam,. Charles Manson, Jim Jones, Elliot Rodger (Cali Student who went on a killing spree) ... Sometimes the person is just evil. Other times, they are mentally ill and don't understand that what they are doing is irrational and morally wrong, or maybe the illness convinces them they have no other alternatives than to kill themselves or others..