If I remember correctly there are 3 things you can't do to save a life: illicit relations, take a life and idolatry.
Meaning even that if you do find yourself in a situation where cheating on your wife would actually save a life then it will still be forbidden