If anyone is stupid here, it's your H and his ap. You're now in a select group of people who have been cheated on. I'm sorry for that, but I'm glad you found us.
I'm really sorry your H is doing this. I have some sense of how much this hurts. If you hurt more - or much more - than you thought you could hurt, well, that's pretty normal.
My reco is to take your H at his word. Seek legal advice. Do your best to tie up your marital assets so he doesn't spend them on his ap - if he spends marital assets on cheating, I guess you may be able to get them back in a D settlement, but I think it's much better to keep them out of his hands for now.
Usually R is a possibility. When one partner is unwilling to work for R, or even pretend to work for R, the best approach seems to be to start D proceedings. You can't control anybody but yourself. Your H says he's out. Believe him. If he changes his mind, you can deal with that when it happens.
Legal advice is absolutely essential to protect yourself.
I'll also recommend counseling for you. I went crazy after my W's A, unable to concentrate, ruminating on what seemed like millions of thoughts and feelings. I started MC on d-day, because R was on the table for us, but it took me a while before I sought IC. A good IC helped me sort through those thoughts and feelings and get my feet back on the ground. He also helped me get in touch with the strengths I had forgotten I had. Lots of us find good IC to be very helpful. You might, too, if you find a good IC with an opening.
If that doesn't help, what would?
*****
Above all, have faith in yourself to get through this. You can survive and thrive. Your H's idiocy may seem life-destroying right now, but it's not.
One survey of elderly people that sticks in my mind is that the happiest group was single women, followed by married men, married women, and single men. IOW, your H may be giving you the opportunity to live your best life. I know it's beyond difficult to appreciate that now, but you have a future, and you may appreciate it after some time passes.
*****
Take care of yourself. Eat what you can. Sleep as well as you can without using sleep to hide. Drink water. Stay away from mind-altering substances. Find activities that please you - baths, showers, swimming, walking, cycling - whatever you do, make sure you move your body. Remind yourself that you can survive this and thrive.
You did not cause this. Your H chose to leave because of issues with himself, not with you or your M. I's probably impossible for a BS to avoid beating themself up over their WS's betrayal, but ... the BS did not fail. The WS did.
As awful as life might feel right now, the feelings are temporaray. You really can survive and thrive after being betrayed.