I registered, just to reply to this very sad thread (so please forgive any acronym slip-ups - I'm still learning). I was in a very, very similar situation. DH was resentful, treating me very badly, and claiming to be unhappy, unfulfilled, that life was supposed to be better/more exciting/fun, that it was all my fault, etc., etc., etc. Tried Relate. Tried another counselling service. Was hopeful that things could be fixed...
Then, one afternoon, I discovered the evidence of the affair (Internet chat history!) At this point something inside me snapped (soon after I lost all the strength in my legs), and I decided it was all over. However, I kept this to myself, for entirely strategic reasons. I switched my behaviour, and embarked on a killing with kindness campaign, allowing whatever freedom/behaviour was requested/demanded. I wanted to give as much time as possible for DH to spend with OW. I explained my change in demeanour by pretending that I acknowledged DH's very tiring and stressful life and agreeing that I should have been kinder and more understanding. I won't deny that this was very difficult. But, it also had the upside that things at home were more harmonious, and I got loads more time to spend with the kids - just the three of us, with no interference.
Another unintended consequence was that DH became much less careful about concealing their comms with OW. I was careful to not even hint at thinking there was an affair. They arranged a dirty weekend. I invited a friend to stay with me and the kids, as I was worried that I'd struggle. But, I didn't. I told my friend and we had a great Friday night talking about the situation, and the future. The entire weekend was excellent, and made me realise that a happy future without DH was entirely possible. In fact, preferable.
I don't mean to sound trite. I was absolutely devastated. I loved DH, and when I saw the Internet chat with OW I very nearly collapsed. Our marriage started to slide around April. I discovered the affair in September, and spent four months killing with kindness and getting my ducks in a row.
The first thing I did was arrange meetings with four or five local solicitors. I found one I liked, and that was very helpful.
Briefly back to the affair - immediately after the dirty weekend OW dumped DH
Sadly I still don't know why. DH became massively depressed, taking to bed for a week, frequently bursting into tears, saying he didn't know what was wrong. Cue me, and more kindness. So much kindness. This seemed to make him cry even more. Poor soul.
The behaviours got more and more demanding over subsequent months, culminating in an absolutely huge row when he decided that our children could no longer see my family (with whom the kids had a very close, loving, relationship). This was in early January. I filed for divorce then, and told him that I'd known about OW all along. For the first time in a long time, he had no reply...
Anyway, I didn't mean to make this about me. Just wanted to let you know that you will be ok, and you will have a fabulous future. I avoided all romantic relationships for almost four years, until somebody at work asked me if I'd like to get lunch. That was 10 years ago. We're still together, and blissfully happy. Well, I know I am, anyway!
DH - not so much.
tl;dr;
I'm so sorry for your trouble. If things do go bad, get advice, and play your cards very close to your chest. It's hard, but once it's all over, you will almost certainly have a lovely life.