i’m just sad

I went no contact with my ex bf and i can’t stop thinking about him every time. I know he doesn’t think about me or even care at all but idk why i do so much. It’s really frustrating. Even though he made me happy throughout the days we’ve been together, he also did make me cry and hurt me a ton. I no longer cry thinking about how he left and thinking about the memories i had with him doesn’t make me sad anymore. But i can’t seem to let go of the thoughts of what could’ve been and the thoughts of how things would’ve played if it was all different and i was with him (we did long distance btw). The other day I dreamt about him which was really weird but i know somewhere in my heart it felt good. I love that i am now finding happiness in things and in a life without him but it still hurts to this day :(