It seems to me that there are two problems here. The first is that we suck at finding/handling the mentally ill. These mass shootings are rare, but the connection between crime and mental illness in this country is anything but.
The second issue is of course that we do a piss-poor job of keeping guns away from the people they need to be kept away from.
Ideally both issues should be tackled.