I had the same problem of not wanting my hubby to have sex with someone we were friends with. It really bothered me.
However, I knew the problem was with me. I wanted them to enjoy their time and express their feelings fully and experience what they had to, I felt compersion everywhere but sex.
My family was abusive where sex was concerned and I was made to watch my very open parents as a child. Being present with them struck a nerve. I was also afraid that what I was hearing or in some cases seeing was more wonderful for him than what we had.
So after much jealousy, crying and throwing things (that's me) I decided that we would try something else. What if I just wasn't present. I didn't want to hear about it, or anything. I would just plan something to do with engaging friends or her husband away from where they were. Over time (about three months) this worked out for me I began to accept that it was happening, avoided eww factor of watching or being in the house with them and learned that my relationship wasn't threatened at all by their love life.
The important thing for me was to step into the uncomfortable and see what I really could handle and what I couldn't. My relationship with my husband only got better instead of what I had feared. We remained good friends with them even after the sexual relationship ended. I like to charge through stuff though so maybe not a great idea for you. But just my experience. It just happened to work out for me.