i don’t really know..
if you’re sure he doesn’t like you then you’re right, you do just need to get over it.
i think it just takes time.. that’s the healthiest most genuine way to do it.
sometimes it’s not until something more meaningful (someone) comes along that you can get over that person. so put yourself out there, make an effort to get to know new people and you should eventually get over him.
in the mean time there is nothing wrong with a little bit of fantasizing as long as you know it won’t go anywhere