What to do

Hey guys so this is going to be a rant because Idk what do. So here we go:

I recently broke up with my boyfriend who we had been going out for almost two years now. We had had a great relationship except for one thing, I did not like his friend. She was nice and sweet, but something a sour her tickled me funny. So I told him how I felt and he still kept talking to her. Afterwards I finally admitted to him that around her I felt insecure and self conscious. We had agreed that because he hadn’t told me about a girl he used to talk to in the beginning of our relationship ( in 6 months) that it was probably the reason why I didn’t like his “best friend”. Yet after three months of feeling better about our relationship I found out on his phone that he had hung out with her recently. His excuse was That he didn’t tell me about her because I lied about my bank account being overdrawn( which at the time we were living together), which was why he justified it. Throughout our entire relationship this girl keeps popping up and he told me that I’m his number one. Yet one time we got in a really big argument and he basically insinuated that he would never take her out of his life. Which confused me even more. Throughout the year I lived with him I found that my self confidence had dropped so much and I felt like he never really fought for me. And yet he told me he wanted me to feel better about myself and then he hung out with her after I clearly told him how I felt about her. I fell Into depression not only because my parents are getting a divorce, but because I felt alone, while he was working fully time, and fully time school and military. Was I in the right to feel the way I felt? Was I in the right to break up with him?

Update: 24 hours later and he said there still hope for us and that we shouldn’t talk to each other for a few days. And turns out he hung out with this girl and she even agreed that he handled our relationship wrong and now he understands after she explained it him. It it wrong that I’m mad at the fact that it took this girl to talk to him once about this whereas I told him a countless amount of times and he never listened?