The person most hurt by all of this is you, not your wife, not your kids. The one you need most to make it up to is you. You have become a liar and a cheat. God gave you marriage, and it was for a strong spiritually grown person and you are not that person. So it is you that you need to go to with honesty most, to take to the Lord.
In the bible, King David did as you are doing. Still David was a man after God's own heart. He paid terribly in this life for what he did. He was a sad man who either lost sons in death or through what they did and it was because of what he did with, especially, Bathsheba. It is in 1 and 2 Samuel. But David's sins were absolutely forgiven so he grew spiritually. You can, too. David was a man who wrote the 23rd psalm, do read it again.
You need God, lots of God. You need the sermon on the mount, you need the book of Genesis, you need what God says in 1 Corinthians, you need the gospel of John. And you need to be humble before the Holy Spirit.