My wife is having an affair and tells me she is in love with the other person. I have never committed adultery physically; however, a few years back I committed adultery in my mind (not physically). I have quit that practice and asked for forgiveness. Does that incident prohibit me from divorcing and remarrying?
Assuming that you have no desire to be reconciled to your wife, then God has permitted you to divorce your wife because she has broken her marriage covenant with you. "He said to them, "Moses, because of the hardness of your hearts, permitted you to divorce your wives, but from the beginning it was not so. And I say to you, whoever divorces his wife, except for sexual immorality, and marries another, commits adultery; and whoever marries her who is divorced commits adultery" (Matthew 19:8-9).
The Greek word porneia, translated here as "sexual immorality" refers to illicit sexual acts. In English it is more accurately translated as "fornication," but since the word "fornication" is not commonly used in English these days, many translations have opted for the vaguer phrase "sexual immorality." In this usage, porneia is used in a broad sense. It refers to any sexual act that is taking place outside of the bonds of marriage, including adultery, homosexual acts, incest, oral sex, and the like.
In essence, your question is whether porneia includes sexual lusts that are not acted upon. The reason this comes up is that Jesus stated, "But I say to you that whoever looks at a woman to lust for her has already committed adultery with her in his heart" (Matthew 5:28). In this statement, Jesus is not saying that sexual lust is adultery, but that it is equivalent to adultery. In other words, sexual lust for someone who is not your spouse is just as much a sin as actually committing the act of adultery. Still Jesus is not stating that they are the same sin. The major point that Jesus is trying to get us to learn is that desiring to commit a sin and actually committing the sin is not that different to God. The Jews emphasized the physical to the point that they excused or dismissed the spiritual implications of the law. They knew that adultery was wrong, but thought there was nothing wrong with thinking about it -- so long as a person didn't actually do it. Jesus is pointing out that sins originate in the heart (Mark 7:21-23). The only difference between thinking about sin and committing sin is the opportunity to act on your thoughts.
In Matthew 19:9, Jesus is referring to the acts of fornication, not just the thoughts of fornication. Several difficulties would arise if thoughts were included, but the most difficult would be proof. "For what man knows the things of a man except the spirit of the man which is in him?" (I Corinthians 2:10). Could a wife demand a divorce because her husband looked at pornography, watched a movie that included scenes of fornication, or looked at a woman walking down the street too long? If a wife was convinced that her husband was thinking about other women, even though she had no evidence of it, could she demand a divorce and then remarry?
Don't get me wrong. Lusting after a woman who is not your wife is sinful. It will keep you out of heaven. It needs to be corrected. However, the porneia in Matthew 19:9 refers to actions of fornication and not the thoughts of fornication.
Still, for argument sake, let us assume that the thoughts were included. You stated that you repented of your sins and the marriage continued for several years. If a man committed the act of adultery, repented of it, and never did it again, could his wife, ten years later, demand a divorce and claim the right to remarry? I hope you would say, "Of course not!" The reason is that if a sin is forgiven, then it cannot be used as a reason to end a marriage.
Even if you had actually committed adultery in the past, but had repented of it, and your wife chose to continue the marriage, that fact would not prevent you from getting a divorce and remarrying if your wife then committed adultery. It should make you more sympathetic to her situation, but it appears from what you said that she has no desire to leave her sin and reconcile. Thus, I believe, sadly, that as you described the situation you would be allowed to divorce your wife and would have the right to remarry.