Getting your relationship back on track after one partner has cheated can be one of the most difficult tasks that a couple can face. Whether the affair was emotional or physical, the loss of trust that results from infidelity can be devastating for the relationship. It’s common for the feelings of guilt, betrayal, and anger to hurt all parties involved. But if you want to salvage an otherwise-good relationship, then there are ways to recover from infidelity that address the damage and help you both move on.

Granted, there are many difficulties involved when navigating a relationship in the wake of cheating. The cheated-on partner often feels hurt, jealous, and angry, while the one who cheated feels guilty and possibly resentful. You will need to address the aftermath of the infidelity, as well as the circumstances that led to the initial cheating. But with adequate amounts of consideration for one another’s feelings, as well as some time to process everything, you can reconnect and reestablish your relationship. Particularly in situations in which you’re motivated to stay together — you’re married and have young children together, for instance — not permitting the infidelity to wreck your relationship may be the best course of action. Here are some pointers for navigating this difficult stage of your relationship productively and with respect for one another.

1. Stop The Affair Immediately

Neville Nel / Flickr

There's no way to heal if the affair is ongoing. As noted in Reader's Digest, ending an affair, "lifts secrecy and creates a sense of safety for the betrayed spouse." Going no-contact with the other lover is crucial.

2. Be Transparent.

Mike Rastiello / Flickr

The one who cheated must be fully transparent about the affair, which can be difficult when feelings of shame get in the way. "It is likely that the deceiver will need to answer his or her spouse’s questions again and again," psychologist Susan Heitler said in Psychology Today. "Honesty, patience, and humble acknowledgment of mistakes will be essential." Chances are, this will be a tough time for both of you, but honesty is a necessity.

3. Let Yourselves Grieve

eflon / Flickr

There are many feelings to process after an affair, and grief is a big one. "You can feel as if you are grieving a death, and in many ways, you are," psychotherapist Tammy Nelson wrote on Huffington Post. "You are grieving the old vision of your marriage or relationship." But your grief is a tool that will help you examine the relationship in a new light and decide whether you want to stay or go.

4. Give It Time

Dafne Cholet / Flickr

When an affair first comes to light, the heightened emotions can make long-term decision making very difficult. "This is not a decision to make at the height of your emotional struggles," Mayo Clinic noted. "Before choosing to continue or end your marriage, take the time to heal and understand what was behind the affair." Giving yourself time to process the events, and discuss them with your spouse after the initial shock has worn off, is crucial.

5. Take Responsibility

effika / Flickr

Both parties will need to examine how an affair was able to happen to your relationship. As psychologist Janis Abrahms Spring said in U.S. News & World Report, forgiveness "must be earned by the offender through bold, heartfelt, meaningful acts of repair. She added that the hurt party also needs to, "take a 'fair share' of responsibility for how they may have created a state between them that made room for someone else to come in between." Some very honest conversations will need to take place, and they will probably get uncomfortable for both of you.

6. Expect Setbacks

Thomas / Flickr

Some days may feel like you're both progressing, and then something will make you think about the affair, and boom: you get angry all over again. "Like the grieving process, there are ups and downs, and times the pain feels as fresh as if it happened yesterday," Michele Weiner-Davis, author of The Sex-Starved Wife, said in Woman's Day. Just be prepared for some emotional backsliding now and then.

7. Address Other Problems

Hoffnungsschimmer / Flickr

It's also a good idea to examine your relationship as a whole instead of zeroing in on the affair at all times. As Daily Mail noted, "an affair indicates a problem and you need to sort out what it is." Again, honest and open communication is the key to overcoming this difficult phase of your relationship.