Miscarriage 💔

I'm 25 years old an I have had two miscarriages.  I was pregnant with my first baby (2013) & I lost my peanut at 6 weeks pregnant cause my hormone levels were low I couldn't pass the sac so I began to hemorrhage almost died an had to have a dnc. Than a year passed I got pregnant again this year(2015) in February made it to 4 weeks pregnant my boyfriend & I were devastated but we took it well I ended up finding out that I was having an ectopic pregnancy. I had a bad incident happen at my home were I fainted an began to throw up blood well I went to the emergency room an which I didn't get seen I was there from 12 midnight till 8 in the morning I passed my sac in the restroom an notify the nurse at the front desk an they still had me wait I went home went to see my primary doctor later that day found out the baby had came out the sac an burst in my stomach I had got rushed hospital an went immediately into surgery the doctor came out an told my parents that he doesn't know how I'm still alive I should of been dead.... I don't understand how this happens to people only God knows but I just would like to know how to get over something like this or make it thru an stop hating myself for this happening to me twice! An one day to tell myself that we will have a baby one day an I won't be scared every time I come out pregnant .