I may not be the best at giving advice about how to avoid it since I haven't figured that out meself yet. And I'm probably not the best at offering up any solutions how to handle it since whiskey is my cure-all for everything.
But, maybe if you start feeling too sad, you can talk to one of the friends you got here. People will listen. Sometimes it helps just to talk about the people you miss.