well... it is a mental health problem. Plus culture. Switzerland has guns and just as many people with mental health problems as the rest of the 'developed' world, but almost 0 shootings.
We just can't open carry them (or own handguns), so it's not in our pockets next to our phone. When it's at home locked in your hunting case, it's off your mind, and you don't think about pulling it out when people piss you off.
Because of this, we also don't have people feeling the need to buy guns to defend themselves against other people with guns in their pockets next to their phone.
I did not mean to imply simply being ethnically homogenous will result in a great society. But it's a component in most of the countries that lead the "quality of life" chart.