Cheating never works and never makes you happy. Talk with your partner about it instead. Show your husband or wife that you cherish the love in between you and that you won’t do this step that others have done in your situation.
If you did a mistake, the first part of the solution is already that you realize it and then accept it. Don't try to find an excuse but turn around and walk the other way. Simply, honestly accept that you made a mistake and for the future commit to live an honest life which doesn’t cause pain for others and later for yourself.
You did not tell your partner that you are cheating but you are trying to tell yourself that he or she would be fine with that. Anytime you do that, whenever you cheat your partner, you actually first cheat yourself with this lie.