<human>: This was my longest relationship by far, and even though he treated me like shit, I still not only feel like I failed him, but that I could've done more.

He was diagnosed with Major Depressive Disorder while we were dating, and I've been going to psychs/counselors since I was 12 for bi-polar/panic attacks ever since. He didn't get help until 2 months ago, and all of the mood swings and irritability was taken out on me. My bi-polar and anxiety was awful, I took many risky decisions which lead to an unexpected pregnancy and subsequent miscarriage and the entire time he didn't seem to care until my mom got involved.

His family always gave me the cold shoulder because they thought I was being the rude one, but between needing to ask him to apologize, him taking out all of his anger on me and me trying to force him out of bed to do things he needed to do (because his mother would ask me to) I just got so fed up.

I finally broke up with him recently, and didn't get any sort of warning, but he decided we weren't going to talk for 2 weeks and he was going to kick me out of our group chats and anything I was in with him. I understand he needs to get better, but losing half of my friend group because he was friends with them first was a really low blow. My anxiety has made it impossible to sleep in the dorm, so I've been staying at home about 30 minutes away, and commuting is eating into my budget. I can't focus on work or school and I just feel so worn down. Can I do anything to help this? How can I feel okay with myself enough to be social and concentrate to get my work done?

Condense the text into a few key points
<bot>: We were basically co-dependant and now I struggle to do anything social and cannot focus on work or school. How do you work back up to doing things again?