find out what really attracts them to the other person.
Why? So you can be someone you are not? Maybe it's just me, but I don't feel that the end justifies the means. I prefer trying to be the best you can be, for yourself, and hope that's enough. But yeah, you should still work on yourself and be an attractive alternative to OP, but you still have to be the person that you want to be...not some other person. I can't imagine modeling myself after someone that would cheat with a married person. But I'm sure that wasn't what you were saying...I was just clarifying.
You cannot be lonely if you like the person you're alone with. Dr. Wayne Dyer