Hi. Well, this does not sound good at all. First, he doesn't sound like he was a great boyfriend to you. He was inattentive, not caring of how he made you feel by flirting with girls in front of you, he had mood swings, and anger issues. Yuck. This is not someone you should be pining away for. Secondly, he has been clear. He does not want to date you. Why do you want to be with someone that doesn't value you or see you as someone they'd be honored to be with?
I'm sorry because I know you feel like you really like him but I just don't see this as a good situation for you. And . . . some people we just can NOT be friends with. He stirs up emotions in you. So you don't have to tell him "we can't be friends" but put distance between yourself and him and eventually have him be almost no part of your life. I think it is really hard to move on when someone we want is still in our radar all of the time. And ... I think it is cruel to tell you that "maybe" somday you will get back together. Keeps you on the leash. And maybe he has an issue with attention and wanting to feel wanted by everyone. Hence the flirting with everyone and not wanting to let you go completely because he likes the secondary gain of you wanting him badly. Yuck, again. You do not need this.
Break it off, keep your distance and look for someone that is worthy of your attention. good luck
Just get out of this situation,it is obvious he wants you to be everything that he is and you aint so it will never work,you are young so just enjoy yourself and put this guy on the back burner and find someone who will except you for who you are
I'm no expert. But its best that you just move on. The worst relationship to be in is one that is confusing. One day he's happy and in love the next day he's flirting and wants to be friends. Find someone who wants the same thing out of a relationship as you. And work together to achieve that goal. Don't keep going back because he'll just disappoint you more.
Good luck!