A couple years ago I had sex with a married man. It lasted about two years and it was revealed to his wife that we were having a sexual affair. I've lied to her about what went on between us. I'm very ashamed and disgusted of what I've done and ask God to forgive me every day. I've come to find out that they are no longer living together and possibly getting a divorce. And it's all because of my actions. I feel a need to tell her what really happened. But I'm sure at this point she already knows. I've been single all my life and am wondering will what I've done effect my future marriage, if I even have one?
It is true that you committed adultery, for which you need to repent and ask God's forgiveness (Hebrews 13:4). However, you did not break up this man's marriage -- that is something he did by committing adultery with you. When it comes to sexual sins, each person is held responsible for his own actions. "Flee sexual immorality. Every sin that a man does is outside the body, but he who commits sexual immorality sins against his own body" (I Corinthians 6:18).
On top of this, you also lied (Revelation 21:8). What I suggest is that you write to the woman, apologize for lying and then state the truth. She doesn't need to hear the details, but she does need to know she isn't crazy for suspecting her husband's adultery. You can say how long it has been going on and that adultery did take place.
As far as how this will affect your future, a lot depends on whether you are going to make a sincere and complete change. "For godly sorrow produces repentance leading to salvation, not to be regretted; but the sorrow of the world produces death. For observe this very thing, that you sorrowed in a godly manner: What diligence it produced in you, what clearing of yourselves, what indignation, what fear, what vehement desire, what zeal, what vindication! In all things you proved yourselves to be clear in this matter" (II Corinthians 7:10-11). I strongly urge you not to marry this adulterer. He has no right to another marriage because he broke his covenant (Matthew 19:9).