Miscarriages ruining my relationship

Ly

It happened almost 3 months ago, then had another the same day I found out a month after that.. it has made me so depressed I don’t want to leave my bed let alone my house. I haven’t left the house in so long I have social anxiety now. My boyfriend has tried to come see me but I don’t want him to because all I do is cry about losing the babies. I don’t know how to fix this. Can anyone help me try to fix the relationship?