How to move on from someone you see every single day!!!

So as for the context, there's this guy in my class. We got close immediately, like something just instantly connected. As per him, we were supposed to be "bestfriends for life"🤡. After a while things got out of hand, we both started having feelings for each other and we knew that it was not supposed to go that way (because of some other personal reasons), but we still needed each other so we decided to get over our feelings and stay as bestfriends, as if it would ever work🥲. After a while, nothing changed. As much as we talked to each other, our feelings just got more worse. And it ended with us being strangers. But I miss him so much and I don't even know why?? It breaks me to see him in class everytime, knowing that I am nothing to him. I cry everyday thinking about how things used to be. How am I going to even survive 4 years??? What do I do??