Hello Zedman, it's always so disappointing when you find out your spouse has been having an affair, and although I'm certainly not supporting this at all as it wedges a rock between the two of you, not knowing what's actually going on when they aren't with you and any messages left on their phone, however, with depression they tend to want to talk to someone new who will listen and pay attention in another way than their spouse.
I'm not a doctor but know of this happening, and it did happen to me, but it was only talking to someone else and nothing more, but can see how it might become more than that.
If you can understand that as she was suffering from depression, it's just like talking to a therapist, getting another view point from a person who is not linked to the situation.
What can happen is that once the two of you reunite and she knows that she has done something wrong, then she and this other person's relationship fades away because she realises that another third person only confuses the situation, but needs to be able to talk to a therapist.
I know it's been tough for you and as your relationship has improved, then a little trust has to be built, once this has been achieved then develop new strategies to get you both on track.
Please take care.
Geoff.