I recently read that people are more vulnerable to extra-marital affairs when they are recovering from a trauma. Since a miscarriage can be very upsetting both emotionally and physically, it's probably a good idea to spend some extra time on your relationship if you have a miscarriage.
Romance may be the last thing on your mind after a miscarriage but it's probably not the best time to ditch date night. Despite grieving, you need to maintain a connection to your partner. Even if you don't want to spend a long time talking about your loss, it's important to just spend time together. Relationships don't thrive if you don't tend them. Keep talking. Keep hanging out together. It's easy to become isolated because you may feel overwhelmed.
Be patient with your partner, especially if you're processing the loss in different ways. One of you may want to talk and one of you may not. One of you may feel the loss more strongly than the other. One of you may want to try again right away and the other may be wary. No two people are going to deal with grief and loss in the same way. Don't let different ways of handling things make you feel like your partner is insensitive or doesn't care.
Touch remains important. It goes without saying that you may be a little nervous about another pregnancy after miscarriage but try to stay physically connected with your partner. It doesn't even have to be sexual; hugging, kissing, hand-holding and cuddling on the couch all have been shown to reduce blood pressure, lower stress and are essential to feeling connected in your relationship.
So what do you do if all of the sudden your co-worker or neighbor or the plumber starts to look really good to you, despite your best efforts to care for your relationship? My advice would be to step back and try to get some perspective on your crush. While the trauma of miscarriage may be contributing to your attraction, there certainly are lousy relationships. Dealing with a loss like miscarriage can make you re-evaluate your priorities and change things (or relationships) in your life that aren't working. You have to figure out exactly why you have the feelings you have. Addressing real problems which probably existed before your miscarriage is very different from romanticizing someone new because you're feeling bereft and vulnerable.
It's probably a good idea to be aware that you likely will feel vulnerable after a miscarriage. Don't make any major relationship decisions lightly. Enlist someone you trust or talk to a counselor to try to talk it through and figure out what's really going on. Taking a few extra steps to care for your relationship is a good idea too.