Couple options,
Make killing people illegal.
Mental health checkpoints at every state border and air port, any hotel or any place people may go that are abnormal to them. Straight guy at a gay bar? Mental health status needs checked.
Ban all guns which may decrease the number of people killed in a mass killing from a crazy persons but not affect the number of mass killings that happen.
Ban all men. Almost all mass killings have been by men and banning them will solve that problem and decrease the numbers of all kinds of murder.
Or realize that freedom comes with a price. As long as humans are involved people make mistakes, outliers will show and people will die. Hopefully once we get out of the stoneage of mental health treatment/acceptance and start to understand it we will make progress to lower the number of incendents like this but until then, people will go crazy and kill their significant other, crash cars, make mistakes at work and die, smoke and slowly kill everyone around them. Its human nature.