It is a tough issue. Something happens and people demand action without realizing sometimes there isn't an easy answer. Same with the homeless. Only way is to restrict rights more.
Why is restricting rights of everyone, or everyone of a certain group, the only way?
We live in a country founded on the principle of the individual. Rights, duties, and opportunities -- all centered around the individual, not groups of individuals.
So, we can use the exact same standards used to assess the trustworthiness of sane gun owners:
Felony convictions
Arrests for violence
Addictions or habitual use of illegal or certain drugs
Domestic Abuse
Crimes involving firearms
Allegiance to groups aiming to overthrow the government
and so on
If those are the criteria for determining if you or I can own and use a firearm, they should be the same for anyone else. If there is evidence that being mentally ill increases the risk of violence -- with a gun or not -- then that needs to be the reason, not simply a historical point in time in which one may have sought counseling or was voluntarily admitted to drug rehab and is no longer addicted.
As I've stated, the rate of violence is the same between the two groups, so there needs to be an INDIVIDUAL ASSESSMENT of each person from whom we intend to remove any Constitutional rights.