Why did this happen?

So there was this boy in my gym class who was be that I started talking to. After awhile I developed a crush and so did he. We started dating and everything was great. We’d text everyday and FaceTime every night. He truly made me happy. Then after a month he really just stopped talking to me on FaceTime and played his games instead. So obviously I got upset because I was being ignored. So I confronted him. He got upset and we said somethings and broke up even though I didn’t want to. I also have a history of self harm so... that’s what I did. Not because he dumped me but because I felt like I wasn’t good enough. He then got back together with me. I didn’t trust it. But I wanted to stay with him. Then everyday he would ignore me except for in person where he couldn’t. After three weeks I said let’s take a break. I didn’t like being treated this way so I needed time. But he said let’s just break up. I agreed because I wasn’t going to force him to be with me when he obviously didn’t want me. So I got sad, really sad. And he texted me saying that he wanted to break up a long time ago but he thought if he did.... the burden of not being with him would “cause me to do something stupid” so I told him I didn’t want to be his girlfriend or his friend and not to talk to me. And now he’s talking behind my back saying I’m crazy... for no reason. What did I do wrong? What did I do to deserve this?