I hate guns but know the reality is they won't go away. Since guns will always be here, what you can do is twofold: 1) make it very difficult to get one and 2) anyone caught either using a gun in a crime, being in possession of an illegal gun, selling illegal guns or not following strict guidelines before selling a firearm, would be sentenced very harshly. However, doing the above won't totally stop crazy people from doing crazy things.
I've had my own experience with an individual who was considered to have a mental illness and who had an episode in which he had weapons and had begun acting violent, but thankfully the police caught him in time. I hate to generalize about motives of evil actions or evil actors, but I feel compelled to state that there are many people in this world who suffer from various forms of mental illness and some of those illnesses combined with other factors are more likely to lead to violence.
All I'm saying is we need to do better job of educating the public about what to look for; what the signs are of someone who is more likely to commit an act of violence.
Don't we all have an obligation in our society to pay more attention to the people around us, be they family members, friends or co-workers and more importantly to notify people in authority of our suspicions?
In my own personal situation, people observed extreme behavior for 3 weeks and this person threatened violence in front of family and co-workers prior to someone finally notifying me (a representative in HR). By then, the employee had already stopped coming to work, had weapons in hand and was on a path to do harm to himself and others.