I am so sorry for your loss.
I was at 8 weeks when we heard the HB, but was told growth was behind. A week later US determined no HB and m/c that weekend. Obviously our baby passed in that week. Yours was probably just a matter of timing with the US, that one day HB was there, next wasn't. They often say when it happens that early it is a chromosonal (sp?) problem. M/C are much more common then realized. After I had mine, I can't tell you how many women told me they went through the same thing. They went on to have healthy pg's and we can all pray the same happens for us.
I have the same experience. Just had prenatal checkup, heard the babys heart beat and felt the baby moved the next day the baby didnt move. Had US after 3 days and I was told my baby is dead inside my belly. I was so devastated and can't believe at first. There are multiple factors which causes miscarriage like stress, trauma, hormonal imbalance, infection during pregnancy, uterus abnormality etc...For hormonal imbalance probably you can ask your doctor to check your blood for Thyroid Function Tests and Progesterone Level. Thyroid Fuction Test tell you whether you have Hyperthyroidism or Hypothyroidism. Both can be a contributory factor to miscarriage if abnormal. With regards to progesterone level I've read that if its low, its not good for the baby.. it can cause miscarriage. US can detect if your uterus is normal or abnormal. I'm sorry for your loss. Take care!