I don't believe the shooters are mentally ill. There is simply sad, evil people in the world that think that shooting a lot of people will get them some attention/fame/recognition. In a society like the current U.S. society where being unknown and alone is worse, in the mind of some people, than being known as a serial killer this kind of thing is bound to happen.
Due to the nature of your society, you will never ban firearms. They will always be available and those wanting to kill can always find another ways.
In mu humble opinion, your problem lies in the fact that some very weird and sad people there find that serial killing is a glamorous life/ending. The worship or desire of a thug life or being known/recognized as a criminal by the media and society drives these wackos towards this behavior.
When consumerism is king and money/oportunity/perspective is low, when not being the most popular thing ever is worse than dying, when parents don't impose limits to their kids and just keep pumping meds into them, this disaster will keep happening.