Why did my boyfriend break up with me after our miscarriage?

Long story short- we were friends before we started hooking up. We remained on and off bed buddies for two years before we fought then didn't speak for a few weeks till I found out I was pregnant. At first he thought I was lying and ignored me. When he realized I wasn't he cane over to talk about what to do. I made it clear that I thought he had a right to know and would raise our baby myself if I had to. I also stressed the fact that I wasn't asking for a relationship etc because I did not want ether of us to feel forced/obligated. He insisted we should try so we did. We had some bumps along the way mostly hormone related and scared but we got along great and had fun together, we planned a future that he seemed just as happy about. I miscarried at 4 months. He was at work and I didn't call anyone till I left the hospital :( he came over that night- told me while he was sad that baby was gone he was happy because he got me out of it and told me he loved me for the first time. I told him he could leave if he wanted but he wanted to stay. We didn't go into detail with each other about the details of my d&c etc and I kept all my pain and guilt inside mainly because I didn't want to hurt him or us. Well I became very down. I didn't want to go out because I felt fat and unattractive on topof not knowing how to handle myself after our loss. I would drink slot and but was never a violent drunk. He came over out of the blue two months later and said that I'm not any fun anymore. I was a chore to hang out with and he no longer loved me. Three weeks prior to losing baby I lost my grand father which was sudden and tragic formy close ffamily. I tried to explain that I have not been myself because of these losses and felt very messed up inside. He told me to lean in my family. The last words he said to me as I was texting him crying was "what makes you think that the man that broke your heart is going to be the one to fix it" I told him I had started counseling a couple weeks after that.. He said nothing. I went crazy and cried texted called anything off and on for almost a year. I know pathetic right..I still cannot believe or understand why he did this and how he could ignore me. No call even on the year anniversary of miscarriage or due date. It hurts like it all happened yesterday.
Why did my boyfriend break up with me after our miscarriage?
Post Opinion