>>11816
Technically Jesus is our example, and He went Self-Sacrifice unto death even through a whole variety of people beating Him, mocking Him, and torturing Him. So, no, there's never an obligation to violate a covenant that's been made before God (which is why Paul warns so strongly against marriage. It's a very serious matter.).
So, again, "should he leave her?" No. "Can he leave her?" Yes, but it would be sin for him to do so (Jesus explains that the man who divorces his wife without her having committed adultery then causes her to commit adultery upon her remarriage. In simpler terms: God holds you accountable for her adultery if you divorce her without a fully legitimate reason. Furthermore, you will be committing adultery with you remarry.).
Now, two things.
1. Maybe you should try marriage counseling rather than bouncing out like this? The fact that you've come here to ask if it's okay to get divorced stands as very strong evidence that you can make a variety of changes in your life and heart to repair your relationship with your wife so that she's not feeling so empty that she needs to look elsewhere.
2. If she's walked away from the Lord, and she asks to divorce you, then 1 Cor. 7 might apply. However, technically, that verse is talking about when they were married /before/ salvation and only /one/ of them has gotten saved. This is very different from a married, Christ-following couple that then one of them falls away. Therein, your automatic reaction, even if she actually commits adultery, should be to help her be restored, rather than to try to leave asap.
So, all of that to say, live in the Fear of the Lord. Remember that you will be accountable for literally every little thing, meaning that, even if you're not punished, because of Christ, you're reward in heaven will be far less than it could have been because of your negligence.
Frankly, the entire way that this question is phrased shows a self-serving mentality from the man that is entirely unChristlike and void of the fruits of the Spirit. If you're asking this for yourself, or a friend, rather than just as a fun "what if?," you or your friend need to go have a very serious conversation with the Lord and likely some accountability partners.