Cierzo : this was not a vote on immigration. Britain will be hurt economically. For most continents UK was the gateway to Europe. Lot of money, businesses and employment came to UK for this very reason. Hence the markets have badly tanked today after the results. Secondly, like you pointed out seems Ireland and Scotland will likely want to leave UK. Lastly, it will strengthen Russian aggression along the EU borders.
This was not a referendum on immigration. Some people made it into exactly that. I don't think EU will be keen to welcome back UK anytime soon. leaving EU also means UK looses leverage in any negotiations now.