If you're in a small country richer people in the neighboring country seem about as likely to have the same effect. On the other hand, if you're in a large country and they live in a different city you're not running into them.
An issue with nationalism is that nations are in some ways very real and in some ways fake.
/sarcasm
It is also not clear how one should calculate this - for example you could have white americans of german dissent violently disagreeing in issues of Trump, or hell, this about civil war. You could have people of different background hold very similar opinions.
Perhaps national happiness (since that is the level of society being discussed) is a joint function of cultural AND financial homogeneity? Many poor countries with high cultural homogeneity have tremendous financial heterogeneity (e.g., wealthy strongmen and their lackeys), which leads to unhappiness.
There are more ways that people want to be normal than just cultural and financial. For example, I would also posit that people with more common personality traits are probably happier. However, money and culture seem to cover a large fraction of how people perceive normality.