This guy was clearly mentally ill. That doesn't get him off the hook for what he did, but there needs to be some way to identify/deal with someone who's lost touch with reality before it comes to this.
There was a similar tragedy in my town 22 years ago. The shooter had a similar perception that organizations or individuals had somehow personally wronged him. He took the lives of four people including a police officer before they got him.