I used to think that we were required as good Catholics to "cut people off" who were living outside of God's laws and in conflict with the teachings of the Church.
However, considering that every single person we know, Catholic or not is doing just that.....and the fact that "cutting them off" is what they expect us bigoted zealots to do (thereby justifying their rebellion against "the Church"), I've had to reconsider the right way to behave.
My advice to you would be to keep the connection with the friend even though it will likely have to be a lighter connection than before. You may just want to call him occasionally to check in and say "Hi.." As far as socializing with him and his "wife" that may be going a little further than you'd want to go. Although, just being polite to the wife is about all anyone can expect of you.
We've had a real life situation with my H's uncle who left his second wife and began an affair with a much younger married woman from his workplace. We ended up going to his house because his daughter was going into the army and they were having a going away party.
The mistress and uncle's first wife (the mother of the army soldier daughter) were both there. It was unbelievably uncomfortable. We were polite. Stayed for 2 hours and then made our excuses and got out of there. But there was no issue that our presence could be construed as implying acceptance of this immoral situation.
Always be kind and polite. If you haven't already stated the the teachings of the Church in such matters, then you must do so calmly and with compassion. After that, I think you have to let it go and just be there when everything comes crashing down.
The likelihood that this relationship will end in distaster, considering how it was founded, is a very real possibility. You need to be there to console and take the opportunity at that time of greater vulnerability of your friend to remind him of God's love and God's law.
God Bless,
MrsZ