If anything relating to the government could've helped prevent this, it would be mental health reform. Our track record in the US is appalling with regards to mental health benefits and even most insurance companies struggle to support adequate treatment. And even if the insurance does cover it, copays are often prohibitively expensive for some people. There's also a long trial and error method before they'll even start paying for certain drugs or treatment.
Clearly, this kid had some underlying issues and for some reason wasn't treated properly or didn't seek treatment at all. But, without more information, it's also hard to say what the reason is so at this point I'm just speculating on what could've helped prevent this.
I also wonder if the idea of "toxic masculinity" also played into this. Males are, for the most part at least, taught by society that they aren't supposed to show emotion and that in order to solve problems violence is often the answer. This one-two punch could've easily played a role in the shooter going off the deep end and shooting up a school. This obviously doesn't excuse what the shooter did though.
I think
@Danoff put it best when he indicated the US has more of a violence problem than a gun problem. We have far too many violent people and if we were to take away guns, they'd just use some other method of causing harm. I mean take the Boston Marathon bombers for example, they killed and injured people using pressure cookers.