it's because of the way we are made, our body gets flooded by love hormones from the start but it doesn't always mean that it's the right person for you, you get the highs while you are still discovering the person and the drop hits really hard the day it finally ends, just embrace life and keep moving forward, maybe the next time try to discover the person really well before committing to anything romantic
the only way to change your habits is to change your social circle, i used to think that motivation and mindset would make me change my habits but the fix was to stay around people who have the same goals as me