Losing baby and my marriage

Chelsi
Before I found out I was pregnant my husband and I were having problems. I've dealt with depression and anxiety since I was 12. I started working really hard on myself as well as some of the issues I had that caused us problems so we decided to give our marriage anther chance. 3 weeks ago I found out I was pregnant(we have a 3 years old) and 5 days ago I found out my HCG levels weren't rising like they were supposed to and I would eventually miscarry. (Btw I went off my anti depressants when I found out I was pregnant). Well to say I've been emotionally unstable especially since I found out I would lose the baby would be an understatement. He told me last night he was done with me and we were over (4 days after finding out the baby was no longer developing). Apparently I have to reason to be emotional or irrational in this time. How do I deal with losing the baby and feeling abandoned by my husband of 5 years? I feel so broken. And I haven't even went through the miscarriage yet...