I don't think you want to be her 'friend' whilst she is having an A. You are her H and she has betrayed you and her vows to you by getting involved with someone else. Of course, this doesn't mean being unpleasant to her. That's not going to help you right now.
I think the kids and you are your priority now. And you need to grasp the difference between being her 'friend' (where you can risk appearing to condone the A) and interacting with her in a brief, pleasant and upbeat way - much like a neighbour.
I think the main thing is to work on your own stability and reliability, so she is more comfortable with you spending time with the kids