How to recover from ending things with a guy

I ended things with a guy that i was unofficially dating that i’m love with and he’s in love with me too. He’s not ready for commitment and so i ended it with him. He wants the summer to be single and maybe in the fall we can be together. (he’s thinking his mind set will be ready by then) anyways i ended it with him, but it hurts like hell knowing that if the timing was right we would be together right now. I need advice on how to stop thinking about him, how to stop loving him, how to recover from this...