Miscarriage...

So the thoughts of being pregnant were actually true. I went to the er today to get checked after 3 days of not getting my period but spotting here and there. This morning I was told that my body is going through a miscarriage... can someone please tell me how to cope with this? My boyfriend and I were so happy when the stick test came back positive and now we're kind of just lost because all of a sudden I am not with child anymore... please help...