How do I let go of a guy that treated me wrong if I still believe we have something special?

I’ve fell in love with a guy right before he told me I wasn’t as important to him compared to the other “people” he talked to online ( after treating me as important , which makes it so confusing). He said this after I lectured him on a stupid , superficial thing he said as a joke and I told him I was crushed , hence unfriending him to avoid further pain. We were never formally together but I believed he had a crush on me , or so it seemed through his actions. Our beliefs, our backgrounds, our interests , and our career paths were so aligned that I couldn’t fathom the thought of us not being together as a couple and still really can’t. We’re both young (19 years old ) and I’m still realistic about it, but I can’t seem to let go completely because I know at heart he is a good person. We both acted out in the moment and he completely changed that day. How do I stop worrying about the probability of our future together and move on?
How do I let go of a guy that treated me wrong if I still believe we have something special?
Post Opinion