The seventh commandment says "Thou shalt not commit adultery".
If one needs God to tell them this, then their moral compass must be way off. So much goes into the act of breaking the vow of marriage (which, while I'm not familiar with the history of the custom, is something all cultures do and have done, regardless of belief system, from time immemorial): deceit, betrayal, coveting, discontent, ingratitude. And lust.
And there you have it. All sins of the interior. As hatred is to murder (see 1 John 3:15), so is lust to adultery. This being said, we break God's heart by turning, from Him, to lust after someone, long before we turn from our spouse to "the other person". Jesus said as much: "Any man who looks upon a woman to lust after her has committed adultery with her already in his heart" (Matthew 5:28). And this doesn't just implicate men.
When a person lusts after something, they wrongfully believe that whatever they desire so strongly, will meet the need that, to their limited perception, is so vital and necessary for their happiness. The corollary is, lust and adultery are unnecessary—when God says He'll meet your needs (see Isaiah 26:3, et al.). Insert it here, whatever need you have. The classic and oft-repeated story is that of David, who lusted after Bathsheba, spying on her as she bathed on her roof (see 2 Samuel, ch. 11). Wait. What? What was she doing taking a bath on the roof? Local custom, I suppose and it could have been the middle of Summer. I digress. Of course, he did have an affair. The child from that union ended up dying (see 2 Samuel 12:18). The entirety of Psalm 51 is David's prayer of confession and repentance to God. Something I'm sure both he and Bathsheba worked through (hopefully).
I would say both men and women are bombarded with lust, more so today, than ever before in the history of humanity. Consequently, keeping one's heart pure in the face of such effrontery has become more and more difficult. But it's not impossible. Prior to marriage, one is free to serve and love God as he or she chooses. Marriage not only complicates things, but brings with it its own set of exclusive difficulties. So much so that Paul asks: "Art thou loosed from a wife? Seek not a wife" (1 Corinthians 7:27). And that he wished that everyone was single (and celibate) "even as I myself." (1 Corinthians 7:7) He's not condemning the act of marriage (something from the heart and mind of God, from time immemorial), he's saying it's easier to serve God in a pragmatic and practical way before you meet the person He made for you. All the while, busying yourself with the work that He gives you to do, keeping your attention upon Him. Another huge component to this whole thing is the realization that God is greater—in strength ("my grace is sufficient for thee: for my strength is made perfect in weakness" 2 Corinthians 12:9), beauty ("and let the beauty of our God be upon us..." Psalm 90:17), compassion ("it is of the Lord's mercies that we are not consumed..." Lamentations 3:22), kindness ("Though the Lord be high, yet hath He respect unto the lowly..." Psalm 138:6), fulfillment ("But my God shall supply all your need according to His riches in glory by Christ Jesus." Philippians 4:19)—than any human being could (mis)represent themselves as.
God understands our needs. He doesn't like to see us seeking their fulfillment in any other way than through the channels which He has provided—either through Himself spiritually, or the spouse with whom He's gifted us.
In closing, I will say this. The dissolution of any marriage involves both spouses, and blame is to be leveled at each. Don't break God's heart over lust. And don't break your spouse's heart either.
"Marriage is honourable in all, and the bed undefiled..." (Hebrews 13:4) Keep it that way. May God help you.