Hi there... I've been on both sides of this. I was pregnant and had my daughter when a friend was battling infertility. And then my daughter died when she was 1.5 yrs old about 18months ago and I really struggled with pregnant friends or friends with small children. It's so difficult...
I would say first of all, that you shouldn't feel guilty about your pregnancy. You should, if possible, try to enjoy it as much as possible - with your partner / family / other expectant parents / friends. Being pregnant is a gift (I know lots of people have difficult pregnancies and I don't want to discount that!) and I think it's important for you (and partner) to make the best of of it.
Your friend is probably in a lot of pain and it will be difficult for her to see you pregnant. But nothing can take that pain away from her - no matter how much you try. I was very angry with a lot of people but really - I was angry with what happened to me. Anyone who tried to tell me that at the time - "you're just angry with your situation, not your friend who really hasn't done anything so bad" - riled me even more and I would just get angry with them too. There are some people I haven't seen since my daughter died, not because they have done anything unforgivable but because I have needed to protect myself from their insensitive ways. It's not ideal and I know people are confused but I have had to put myself first to survive.
There's no perfect solution to this situation. When I was in the depths of my grief I wanted to connect with people who understood so I linked up with other bereaved parents. But I also wanted to feel that my friends loved and cared for me and didn't forget me / my partner / my daughter. It was a very difficult balance at times between wanting to protect myself and not wanting to miss out on what was happening in people's lives - as this might just make me feel more lonely.
If I was your friend, I would probably want to hear things explicitly: that you care and love her, that you are devastated by her pain that you want to support her in any way you can (while acknowledging that you can't understand if you haven't been through this), but that you find it difficult because you worry about causing her pain with your pregnancy. I would want to hear that you want to be there for her if she wants to talk about the miscarriage, and that perhaps you can do this by email or phone if she doesn't want to see you. That if she doesn't want to talk about it, that's ok too, but that you will take your cue from her. I don't know how far along the miscarriage was, but things like referring to a baby by name (if there was one) remembering dates (birthdays and anniversary of death) are really important and those who remember are very very much appreciated (that's my experience - but maybe it's different with miscarriage and some people may not want to be reminded). I would also want to hear that you will only talk about the pregnancy if I explicitly asked because you don't want to upset anyone. But that you will talk about it if she wants. Bland statements are helpful updates if you think she wants something but not too much, I often say - "the pregnancy is progressing uneventfully which is good". I might want to be reminded of all this occasionally - particularly the bits about whether she wants to talk about her feelings and your pregnancy... it's nice to be reminded every so often. You might also want to talk to her about what she would like around the birth of the baby, how she'd like to be told and if / when / how she'd like to see the baby (never (that's me), with other people, alone, as soon as possible, or not, etc)...
It might also be worth looking up the miscarriage association or SANDS to see what advice they give. Anything you can do to understand better will help your relationship.
Ultimately you might have to accept that she will just express feelings of anger towards you for a while, which may seem deeply unfair. But my best friends are those who are able to ride that wave and be there to meet up again on the other side without any hard feelings. It's tough but it's worth it.
You sound like a wonderful friend, but make sure you don't beat yourself up too much.
xo