It may take you weeks or months to get over him. It all depends on how long you were together and how you two got along .The length of time can also be determined by how you are willing to handle the situation. You should surround yourself with people who love and care about you like friends and family and keep yourself busy as this will help.
I had almost the same problem except he was going to a different highschool than me :( It was hard because I liked him since 5th grade but i learned to accept that I wouldn't see him anymore :) trust me I know it sounds hard but it's not... Well atleast it wasn't for me :) Maybe go out with some of your friends, do something that will keep your mind off of him. Honestly though, it's not as hard as you think, you'll find someone else and you won't even remember him. It took me two weeks... And he was also my best friend! Good luck :) lol
The same thing happen to me but he was like my best friend and I spent a lot if time with my friends but I still get to hangout with him sometimes cause the state he lives in is on the way to the state my grandma lives in so we drive to his house and then go to her house so just spend time with friend and family and that will make it easier