Sorry if I missed something, but I couldn't discern whether the friend and co-worker are just attracted to each other and flirty at work, or whether they actually communicate outside of work and he confides in her. If the latter, I would most definitely consider it an emotional affair. Otherwise, I'm not sure I'd label it as an emotional affair, but I would consider it inappropriate. He's doing the right thing by distancing himself, but he really needs to communicate everything to the wife so they can work through it together. If things improve in his marriage, it hopefully will help motivate him to stay away from the co-worker making the temptation less.