Does the Church accept divorce due to infidelity? I was reading in the Gospel: " I tell you that anyone who divorces his wife, except for sexual immorality, and marries another woman commits adultery" (Matthew 19:9). Would the victim of such a relationship be committing adultery if they were to divorce and remarry?
The Church does recognize that there are certain situations in which divorce is the only reasonable way to protect rights or well being:
**2383 **The separation of spouses while maintaining the marriage bond can be legitimate in certain cases provided for by canon law.
If civil divorce remains the only possible way of ensuring certain legal rights, the care of the children, or the protection of inheritance, it can be tolerated and does not constitute a moral offense.
Canon Law explicitly mentions adultery as a legitimate reason for separation of spouses:
SEPARATION WITH THE BOND REMAINING
Can. 1151 Spouses have the duty and right to preserve conjugal living unless a legitimate cause excuses them.
Can. 1152 §1. Although it is earnestly recommended that a spouse, moved by Christian charity and concerned for the good of the family, not refuse forgiveness to an adulterous partner and not disrupt conjugal life, nevertheless, if the spouse did not condone the fault of the other expressly or tacitly, the spouse has the right to sever conjugal living unless the spouse consented to the adultery, gave cause for it, or also committed adultery.
The Church recognizes that adultery gravely damages the emotional, spiritual, mental, and even physical well being of the innocent party. In such circumstances cohabitation can be nearly impossible for the devastated party.
However, note that canon law explicitly points out that the marriage bond still remains despite the physical separation. Civil divorce is a civil remedy to safe guard civil rights and safety, it does not (and cannot) dissolve the marriage bond.
From a psychological perspective an affair is rarely about the affair. The affair is usually a symptom of deeper problems in the marriage or the person. If it can be shown that those issues affected the original marriage consent then an annulment is possible. Otherwise the marriage bond is presumed to be valid and still exist.
For more information about that specific Scripture verse I recommend: What is the divorce exception in Matthew 5:32?