We have other dangerous factors, like political parties (both...don't deny it) that encourage division as a means for holding on to power.
We have a non-homogenous society that is becoming more non-homogenous, sometimes by designed goal, not mere toleration (again, for political power).
And so on.
Japan has the same loneliness issues, but their homogenous society has more (and a different type of) inherent community, and they don't deal with it through mass shootings. They deal with it through suicide. They have honor to hold them back. We have religion to hold people back, but we are working hard to undo that societal limiting factor. Look at Switzerland: Every person over the age of 18 in Switzerland has an automatic weapon ("worse" than the US), but they deal with their problems in their own way as well.
Each society is its own cocktail, and responds to their own ingridients in their own way. We have to stop thinking we can be like others, and solve our problems our own way.