I guess it differs from one person to another, but all you have to do is to get him off your mind as long as you can. Keep yourself busy, do sports, go out, make new friends, just do anything that would get him off your mind, and with time you'll forget about him.