how to get over a guy ?

so me and this guy have been on and off for 3 years how but now it’s just sex nothing more and i broke things off but now im just sad because he meant so much to me and yea 😭 kinda ranting sorry