I need some advice

Marguerite • I`m 31 years old married to my wonderful husband Thomas. I have three sweet pups that are my everything and we just brought into the world our little rainbow baby July 7th 2018. After two loses he is our miracle.
On March 29th I went for my Nuchal translucency screening and found out my baby no longer had a heartbeat. On the 30th I went in for the D&C and they gave me a picture of the baby. The measured at 9 weeks 1 day. As I was thinking back to then I relized that day I had been really sick. Violently throwing up for hours trying to keep any fluids or food down was impossible. Could that have been the reason my baby died. I thought I had there was something wrong and I had called the over night doctors that night and they told me to just try and drink slow and warm liquids no one said to go to the hospital. I keep thinking if I had gone to the hospital I would haven't lost my baby. This was supposed to be my rainbow baby and now I have two angels. I feel like I failed as a mom already and maybe don't deserve to be a mom if I could have prevented this.