I'm going to digress a bit and talk about your friends specific example. First and foremost, if someone is sleeping with your girlfriend when they know you are dating, that person isn't a friend, let alone a close one.
In your example I would argue your friend clearly still cares about his ex if it hurts him to be around her. So maybe learning to forgive and having her back in his life as a friend wouldn't be the worst thing.
Obviously there are a million fish in the sea but there isn't a limit on friends. I personally had a bad breakup where I wrote the ex out of my life but I have now forgiven her and wish we could be friendly. But I certainly don't blame anyone for breaking off contact with an ex who cheated on them.