How do you move on?

I've liked a guy for two years now. And I can't move on from him. It's hard. We talk and all. Offline and online. But now he goes to TAFE, I never see him, and he friendzoned me twice because he's bad for me. How do I move on from this? Any tips?