I hope you are having a sleep now. My utmost sympathy for you.
You are in shock so concentrate on looking after yourself. Plenty of hot tea & try and eat little & often.
I agree you need space in your own home to process what has been happening without him around. So even if it's a temporary distancing thing from him it's better for you.
Tell supportive family so they can rally round. You don't want to be spending long tracts of time on your own with or without the dcs.
Also tell his family, as he needs to feel the full ramifications of what he has done.
I guess what has happened is that they have flirted, then admitted to each other that they are "good friends". This flattery is highly addictive and he has probably crossed one boundary after another to keep the high of the thrill & excitment going. Before you know it, your in a deep tunnel of an affair, the secrecy keeps it thrilling & exciting. But also very stressful I imagine.
You don't have to make any decisions about your futures any time soon. So look after yourself & your dcs. Take time off work if need be.
You will have episodes of forceful anger so tell him how you feel.
This is the most awful time for you. I remember it well. The same thing happened to me 6 or so years ago. I kicked him out. About a month later he moved back in and we had to work to stay together. It was hard, exhausting. A terrible learning experience. But ultimately worth it.
Your H has to be willing to take the blame, because NON OF IT IS YOUR FAULT!
He has to accept that he has made the wrong decisions, at what point he did this & why.
Also he has to go cold turkey & not contact OW every again through any medium or forum. This is v important, especially if he mistakenly thinks they are "friends".
He has to realise that he will lose your comfortable, public relationship if he does seek to and work at protecting your relationship with him. His primary relationship is with you.
I hope this helps. I will check this thread for updates. Thinking of you.