I occupied myself with my other hobbies. It keeps my mind focused on that activity and not on the fact that I miss that someone every moment I'm not with them.
I think about the time we've spent together and how much more time together we will have in the future.
If you don't have a job, get one, and make sure it is a long hard working day! Soon enough you will have so much work on your mind that the missing someone will go away. The main point is to occupy your mind and the best way is to make your thoughts go toward something more useful.
If you have a picture look at it. If you can't do that. call the person. If you can't do that e-mail. If you can't do that write a letter. If you can't do that do that "occupy your mind" I would suggest something fun like answering random questions on wiki answers.
cheers ...add a few suggestions