I'm sorry to hear this is happening to you.
I had an 'emotional' affair four years ago- although in my case there was little that was very 'emotional' about it- it was purely sex talk.
Eventually I told my husband because I was afraid of what was developing, and I felt like I needed to make a cry for help, if that makes sense. DH was absolutely crushed by the news, and he asked to see the messages between myself and the OM. I allowed him to read all the messages that I still had. I'm still not sure whether that was a good idea as it hurt him immensely, and made me feel sick to my stomach.
In the aftermath, I tried to make amends in a number of little ways. I knew it would take time to repair the damaged trust, so patience was needed, and I also knew that actions would likely be more helpful than words/promises/grand gestures. I took to leaving my phone downstairs when I went up to bed in the evenings. I did this deliberately so that DH would know I wasn't furtively texting/FBing. We didn't actually talk about it, but I'd just leave the phone on the coffee table as if by accident and then DH would bring it up with him.
I also remember cutting my internet use a great deal. Staying off FB, MN and other forums I'd been using. I made more efforts to talk to DH in the evenings, in place of surfing the net.
I tried hard to show physical affection towards DH, which was a little difficult for me as I'm not very tactile.
We both made efforts to communicate more, and to spend more quality time together.
I won't lie, I thought about the OM for quite a while afterwards, and it took a while for the temptation to go away. But it did go, eventually. And when he got back in touch 2 years later to try to initiate some smutty chat, I was able to tell him to bugger off and block him. I was transparent about that too and showed DH the message he'd sent me, and my reply.
I don't know if any of this is helpful, as it's looking at it from the other side. But although we all know that 'building up the trust' is what needs to be done, it can be difficult to know what that actually looks like, and I guess that would be different between different couples. Would you and she consider Relate? My DH and I went to one session (at his request) and the counsellor was very encouraging and felt that we could make things work.
Things are great between DH and I now and all that feels like a distant memory. I hope you and your DW can get through this and move on to brighter times.