“I wasn’t happy for a long time (so, I cheated),” says Cheater.
Thou shalt not commit adultery.
-Exodus 20:14, KJV
I think the unhappiness excuse is one of the worst ones given by cheaters.
Your spouse does not have the ability to control how you feel. That is work you need to do on your own. You are responsible for your own happiness.
Cheating is not a legitimate or ethical choice to address one’s unhappiness.
Take up painting. Join a group exercise class. Train for a half marathon. Take up bird watching.
These are all things someone can do to address unhappiness. None require the individual to lie and otherwise abuse the trust of their spouse.
Cheating is a choice.
Only the chooser can choose otherwise. They are responsible for such sinful choices and need to see this in order to even have the power to repent.
This is not about unhappiness but rather someone who thinks that they are allowed to sin against God and their spouse to pursue an emotional “high.” Until the cheater sees this, there is little hope for them spiritually.

