Agree with the above 100%.
I don't see how anyone can make the argument that serious mental instability is not a legitimate factor to consider when determining if a right may require restriction in some manner. However, I am very suspicious of how the call is made and who makes the call. The fairest system would seem to be the same system that decides whether one represents a serious enough threat to have his freedom taken away by being sent to jail.
So mental health professionals, just like anyone else, if they felt an individual was a threat could apply to a court to weigh their assessment. So a judgement, by a competent court, of mental defect requiring institutionalization (I am sure there is a better way to define that) would be needed not merely the say-so of a doctor or other official.
Is that a perfect system? Of course not, just as the overall court system is not perfect in deciding who is actually guilty of crimes, however, it is a reasonable facsimile of justice and it has the advantage of a defined system to ensure due process.
The bolded part. That's the crux of the matter in my mind. The rest of your post would be reasonable if it didn't take so long to get anything into court, weeks and months just isn't acceptable. An example of the legal process is Chris Christie taking forever to issue gun related pardons for CCW'ers that have a valid license in other states coming into NJ. Courts are insanely inefficient. Also a second opinion would be prudent, it's just too easy to get railroaded these days and the presumption of a mental defect would be already in place by the very fact that a legal action is taking place. Innocent until proven guilty isn't too common these days, I would imagine the same would apply in this instance.