If I found out that my best friend or significant other was having an affair, I would be devastated. It would cause a lot of hurt and confusion for me as the person who had been betrayed. On one hand, it is important to respect my friend's/partner's decision if they decided to move on with someone else; however, on the other hand, there is also a need for closure if our relationship is over.
One thing that could help in this situation is communication: talking through how each of us feel gives us both an understanding of why things happened and what caused them to happen. For example, it may come down to discussing underlying issues such as trust issues or feelings of disconnection due to changes in lifestyle choices etc., which can then lead into further discussions about ways we can take steps towards strengthening our relationship or rebuilding trust between us again if possible.
If all efforts failed though and ultimately both parties decide amicably that ending the relationship/friendship would be best in order for either party (or both) to heal and move forward with their lives positively without dragging up old wounds from time-to-time, then so be it - at least you know you tried your utmost best!