We prefer simple answers. Unemployment is high? The obvious solution is to reduce the number of people in the country. Because I can't say my neighbor has to leave the country as I don't like him, or all stupid people have to go, an easy to pick group are the immigrants.
This definition of a group is as flawed as the others, what is an immigrant? A resident alien person? Even the second generation? People with Islamic backgrounds? People who don't look like the norm or what we believe the norm should be? We all are because our common ancestors came from Africa?
Okay, so let us put that thought aside for a minute and simply accept that there will be a gray area always.
Does above solution work for large, anonymous mass of people only? No, it does not matter how big a country is, if we get rid of many people the unemployment will go away.
If we create a fictitious country of ten people, we need 9 working in agriculture to get enough food grown for the entire country of 10 and 1 is unemployed. So our unemployment rate is 10 percent, if we get rid of the one person the rate is a perfect zero.
But now our country requires less food, 10% less, so we don't need 9 people to work but just 8.1 people. So our agreed solution is to throw out yet another person, correct?
If you really love your nation, you should embrace immigration. Use them to make your country stronger, not amputate yourself.
And there are certainly more side effects in nationalistic movements than the two listed above. Nationalism means tight control and less freedom hence, less innovation, higher administrative costs due to the control structure, opportunity costs due to trade restrictions applied from the inside or the outside to name a few.
Nazi Germany: Amputated themselves by reducing the population significantly, the wealth of them was stolen by a few leaders who had more than before but things got more expensive at the same time. Then a good chunk of people had to join the military or police removing them from productive work. Yes, the unemployment was less for a period of time just to be extremely high after. Regime collapsed.
North Korea: For stability an enormous military force is required, people are starving. That can't last forever.
I am sure you can come up with more examples if you think about it.