My ex keeps coming back.. help?

I fell in love with this guy who had a girlfriend. At the time he was very unhappy with his relationship, so he always came to me, We became very close and he told me that he loved me. We hung out more and more until one day he disappeared, by which i mean he avoided me and didn’t reply to my texts. That was about... show more I fell in love with this guy who had a girlfriend. At the time he was very unhappy with his relationship, so he always came to me, We became very close and he told me that he loved me. We hung out more and more until one day he disappeared, by which i mean he avoided me and didn’t reply to my texts. That was about a month ago, and since then he would contact me again, then disappear. Before and after school i would catch him looking at me with sadness. Today I found out he emailed me last night with a link of a poem he had to write for a class that i helped with, which was a love poem about me. He emailed me “i still mean it.” I need to get over him due to the fact that he constantly broke my heart appearing and disappearing from my life to “get back together” with his girlfriend, but how am i supposed to move on when he does stuff like this.... I need advise :(