Wait: I'm a democrat and have been for decades.
I DO believe that some level of mental illness should preclude someone from having access to firearms, either temporarily or, if the situation called for it, long term or even permanent. I'm not a psychiatrist so I won't venture to name a level because it would be meaningless. I do not think that people with schizophrenia, for example, should be able to purchase or have access to firearms. Some other serious psychiatric disorders that cause instability and inability to think clearly and to determine right from wrong and to act on it appropriately. Possibly never should that change. On the other hand, someone who is going through an extremely difficult time and is having a temporarily very serious depression that is likely to or demonstrably has caused them to consider harming themselves and/or others should also have zero access to firearms. When they are stable again, with a good prognosis of remaining stable, that's different. They can resume hunting and skeet shooting.
I DO believe that serious mental illness is a feature of most, if not all of these mass shootings. I believe that such easy access to firearms, particularly semi-automatic, military grade weapons is also a strong factor in these shootings. We can control the second: access to firearms much more easily than we can compel or even provide effective mental health treatment.
Even if we had a 100% effective cure for mental illness likely to result in someone trying to kill themselves or other people and it was affordable, with easy access and had zero negative side effects, we would still need to get semi-automatic weapons out of the hands of private citizens and to enact much more stringent gun control laws than we have now.