Do people really think the mentally ill are that dangerous? Who do you think is more likely to shoot someone with a gun: Someone suffering with an anxiety disorder (a mental illness! oooooo so scary) and purchases a gun because they're afraid their house will be broken into, or a loud racist bible-loving truck-driving beer-drinking violent redneck with his own person collection of hundreds of firearms? One is """""""""""""""normal""""""""""""" and the other is mentally ill. Feel free to guess which group is more dangerous and has more guns combined than any other group in the country.
Violent =/= mentally ill, most mentally ill people are absolutely not violent and are far, far, far more likely to be a victim of a violent crime. For those who equate violence with mental illness, do you think every member of ISIS just happens to be mentally ill? The mental illness brigade? Awfully convenient. Is the dumb popular jock at a highschool who shoves nerds into lockers and gets into fights mentally ill? No, society would consider him perfectly normal, just like the redneck. People in general are just violent. It's unfortunately human nature. Someone mentally ill is more likely to not have the energy to even act on violent impulses if they had any to begin with. Most violent criminals are not mentally ill.
If owning guns is a constitutional right (which I don't believe it should be, but it currently is) then flagrantly denying constitutional rights because of someone's medical history, someone who has never committed a crime, it sets precedent to start denying them any other rights. "Oh you're mentally ill, sorry the first amendment doesn't apply to you, you can't have free speech anymore because you're mentally ill, so just shut up

" Dumb example but you get the idea.
It's almost like pre-crime prosecution, essentially criminalizing people before they've even had the chance to do anything illegal.
"Oh, you have depression, so you might end up killing people or yourself, so we're going to go ahead and take away your second amendment right juuuuuust in case"
Meanwhile gun-toting rednecks can just waltz on by with their guns and do whatever they please, completely unaffected because they're likely not diagnosed with anything.
So targeting the mentally ill is not only going to further stigmatize them, but it's not going to actually prevent anything.
If guns weren't a constitutional right and you needed to apply for a license like a car to get one, making it a privilege, then I could see someone's medical history preventing them (just like epilepsy would bar you from driving) but that's not how it currently is. Either people have a right to defend themselves, and the mentally ill ARE people, or they don't. America really needs to decide. I don't like guns at all but I hate double standards like that even more, especially when it's based on misinformation that would damage an already marginalized people and wouldn't stop massacres from happening anyway