The current trend of blaming mass shootings and other rampage killings on mental illness is a mistake. It is both a mistake because it's wrong, and because it leads to bad policy - solutions that simultaneously have no impact on the problem but increase the stigma on mental illness and make people less likely to seek treatment.
Looking at any mass shooting or rampage killing, we generally see no evidence of any mental illness, even including personality disorders. Most of the time, the only "evidence" that a rampage killer is crazy is the rampage killing itself. That's not a serious proposition, but circular logic: "Every rampage killer is crazy because a rampage killing means they're crazy."
If the theory was true, more rampage killers would look like the Giffords shooting - a sudden, opportunistic blitz attack that is quickly stifled. The shooter's history would be more common too; a substantial paper trial of erratic, bizarre and threatening behavior along with crazed, nonsensical writing. This man was clearly mentally ill before the shooting, and as a result, was not nearly as effective as he could have been.
But this is the only recent case that falls into this fact pattern.
If there was a genuine connection between mental illness and rampage killings, this fact pattern should be common. But the facts here are nearly unique to this case. Despite this, everyone seems to automatically assume that every mass-shooter was a lunatic with a long and obvious history. This is, on a factual level, wrong.
But the false connection adds a real stigma. People who are believed to have a mental illness are more likely to be avoided as a result of the belief that only the mentally ill are rampage killers. But as just explained, there is no connection between the two. Nonetheless, the stigma does substantial harm to the cause of mental health. Many people already afraid of the stigma of mental illness are reluctant to seek treatment for mental illness. Requiring mental-health professionals to report their clients to the government will make people more reluctant to seek treatment.
This is even more true for people most in need of treatment, who are dangerous to the people around them. Many of these people believe in vast conspiracies of dark forces surrounding them, and it's hard to convince someone to see a doctor when the person is convinced the doctor will snitch on them. It's even harder to convince them when they're right.
Nor is it effective or productive to permanently strip someone of their gun ownership rights because they checked into a mental hospital at some point in their lives. This places anyone who is in need of serious mental health treatment in the position of asking if it's worth giving up their rights forever, just to seek treatment. That added cost to treatment will, again, result in fewer people seeking help when they need it.
Involuntary commitments are equally dangerous. Someone who suffers a major trauma and if confined on a short-term basis for their own protection should not be treated like a felon for the rest of their life. And that's leaving aside the possibility that, like the Soviet Union, activists and malefactors will exploit the commitment proceeding to serve their own ends. Involuntary commitment is a dangerous tool that should be only in extreme cases, and carry the minimum price to the committed.
The massive costs would raise a serious question of worthiness even if it addressed a real problem, but this problem is a fiction. The problem of mass shootings and rampage killings is not a problem of mental illness.
It is a problem of evil.