Dear Jane
I am so sorry to hear about your loss. Having had 4 miscarriages, I can well imagine what you are going through. As the other posters have mentioned it is extremely common, but that does not help your grieving process. Neither does the knowledge that it does happen for a reason, a fietus usually miscarries if the genetic make-up mean that it will not survive outside the uterus.
Having a miscarriage does not mean that you will have trouble getting or staying pregnant next time. Despite my history, I have 2 perfect children and am 6 months along with my 3rd. Must admit that I am totally neurotic every time though, and my doctor is probably sick of the sight of me (I assume that every little twinge or drop of blood is bad news).
There is nothing that you can do to prevent a miscarriage, especially at 5 weeks. Neither is there any set time that you should wait before trying again. Give yourself time to recover from this loss and try when you are physically and emotionally ready. Some doctors say to wait one or two periods, which helps with dating the pregnancy etc. With modern ultrasounds, the dating is no longer a problem. Some doctors will prescribe aspirin, progesterone etc. for future pregnancies, but that is done on a case by case basis.
I promise that it gets easier. Just allow yourself time but keep reminding yourself that you did nothing to cause this and could not have doen anything to prevent it. Very best of luck!!!