I moved to a different state long time ago in 5th grade without being able to say goodbye to my friend or anything. :T For me, I just let time heal everything. Eventually I made new friends and was able to deal with the pain of losing my best friend. 3 years after that, I found her on facebook and we've been talking ever since! I also think that video calling is the best way to stay in contact.
Just because your friend is moving doesn't mean you can't talk to or see him/her. Remind yourself that constantly. Know that you are lucky to have the capability to stay in contact with your friend. And just think how cool it will be to casually tell people, "yeah, I was talking to my friend who lives in *insert location here* and....." and things like that.