I doubt if it's really possible to forgive and forget when someone has hurt us very deeply -- apart from God's help. But with His help it is possible -- as I hope you will discover.
Why do I say this? The reason is because hurts like this, if they aren't dealt with, become a fertile soil for all kinds of poisonous fruits -- things like anger, bitterness, envy, resentment, despair and hatred. And when they do, they turn us into unhappy, unpleasant, joyless people. No wonder the Bible commands us to get rid of all bitterness, rage and anger, brawling and slander, along with every form of malice (Ephesians 4:31).
What must you do? First, remember how generously Christ forgave you.
You hurt God far more than anyone has ever hurt you -- and yet He willingly sent His Son to die in your place so your sins could be forgiven. Not only that, but the Bible says God will remember them no more (see Hebrews 10:17). Never forget how much it cost Christ to forgive you. The Bible says, "Forgive as the Lord forgave you (Colossians 3:13).
Second, pray that you may begin to see your ex-husband through God's eyes. God doesn't approve of what he did -- not at all. But God still loves him, and Christ died for him -- just as He did for you. Don't hold onto your hurts any longer, but turn them over to Christ and ask Him to help you forgive -- and even forget.