First, I'm sorry for your loss. We've had 2 miscarriages, both in the first 3 months of pregnancy. The first miscarriage was our first pregnancy and we had just told our friends and family. We didn't know anything about mourning and struggled to deal with it.
When your body is ready, and your OB/Dr advises it, exercise (swim/bike/run) is a good way to lift your spirits, at least it helped me. Listen to your body. I hope that through exercise and the comfort of your friends/family you'll find comfort.
It's a starting point.
Best to you,
Sara