Just a little information from the UK - I had a licence for a gun and a part of the process was a police check that did include an assessment of mental competency (which I passed)
Unfortunately a man who should have lost his licence due to mental health issues but didn't, went on to commit the Dunblane massacre which took place at a Primary School near Stirling, Scotland, United Kingdom, on 13 March 1996, when Thomas Hamilton shot dead sixteen pupils and one teacher, and injured fifteen others, before killing himself.
The consequences were that all private ownership of handguns was banned in the UK
Homicides by shooting are down to around 30 per year (in a population of 70 million)
I really feel for you living in a country where it is a right to keep and bear arms because a consequence of the second amendment, is that you have to accept the mass shootings and of course the daily deaths.