I dont know what to do.

I went to the doctor yesterday and was told my baby would never never make it to term, that with in the next few days I will not be pregnant anymore, my egg sac is closing in on its self. Im so lost, and i cant help but blame my slef. I dont know what to do. I have to remember my husband is going through it too. But its hard.