Hello Friend, Good that you are seeking a help here. Relationships with such contrast behaviors need a second thought. Don't try to park your happiness on such individuals or relationships where you are not enjoying anything and in fact it's affecting your mental stability. Relationships break up will take time to accept and adjust with reality. You may think that it's easier said than done, but surely this is possible if you take a professional help.
Pls openly discuss your problem with a psychology counselor to ventilate your emotions, feelings and concerns. Such discussions will help you to get a different perspective about yourself and about your problems with a suitable solution.
Next Steps
Feel free to reach out to me online for further evaluation and recommendation. Be positive. You will be alright soon.