I came across this article from Rick Warren about finding your way back to purity from past adultery. I hope you find this helpful.
THE PATHWAY BACK TO PURITY - Rick Warren
If you've been unfaithful to your mate there is still hope. You can come to Jesus Christ for cleansing. Adultery does not have to kill a marriage. It is actually like a ship. You bring it into the dry dock, refit it, retrain, repair it and send it back out. It is more effective going out: it will go faster and farther.
Three steps to purity:
1. Acknowledge the sin.
Ps. 51, David's prayer when he committed adultery. Stop rationalizing it and call it what it is. it's wrong. It's sin. It's not an affair. It's adultery, that's what the Bible calls it. God has never changed His standard and He never will. Premarital sex is unacceptable to God, it always has been it always will be. Living together without being married is unacceptable to God, it always has been it always will be. Adultery is unacceptable to God, it always has been it always will be. God does not compromise on this.
There are no perfect people in this church and it is not a place for self-righteousness. It is a place to come and get your act together and a place to come to find forgiveness and healing and a new life and break the power of temptations that you don't think you can break on your own because you can't without God's help. This is the place to do it because we're all working on it together. We all know what we're capable of and we're not kidding each other so we don't fake it or pretend. We know we need guidelines to keep us in line. Confess and receive forgiveness from God and then you can forgive yourself. Even if there were no heaven it's worth it -- get rid of the shame.
2. End the relationship immediately.
Do it now. "Today if you hear God's voice don't harden your heart" the Bible says. Take action immediately. Don't delay. You move slowly out of fellowship but you move quickly back into it.
3. Avoid all contact with that person from now on.
You can't be friends after you've been lovers. Do whatever it takes to do. End the relationship cold turkey. No more letters, cards, visits, meetings to explain it (call them on the phone to explain it), if they keep calling you up your practice hanging up. Do whatever it takes to void that situation. If it means changing jobs, do it. Better that than lose your soul. If it means changing churches, do it. Whatever it takes to break the relationship.
God thought up sex. It's His idea. In marriage it is wonderful and fantastic and a beautiful expression of Christ's love for the church, the bible says. But used improperly it destroys marriages, damages families and lives, damages self esteem, creates misery and guilt, shame and regret, depression. God's way is the best way and you can get back on tract. You open your life to Jesus Christ and say, "Jesus Christ, come in and be the manager of my life and help me manage this sex drive that You gave me in the first place." You ask for forgiveness for past mistakes and sins and receive that forgiveness and then you can forgive yourself. Then you make a commitment to be morally pure the rest of your life forward. That means you're going to have sex only to the person you're married to. Maybe you've realized that some of those thoughts in your life weren't harmless after all and you need to say, "God, help me change my thought life." Maybe you've been involved in an emotional attachment and think there's no sex involved so it's OK. Nip it in the bud. Maybe you've had the heartbreak of an affair in your marriage. There is hope.