Really needing advice and input 😔

So my husband randomly said he doesn’t want to be together anymore. Over text. We weren’t even fighting or anything he just randomly said it. I told him he needs to be very clear because I can’t keep guessing how he feels. He said “I don’t want you anymore” multiple times.. he wanted a divorce. I kept asking why and if there was anyway we could work on this or something. He said there’s no hope left and he doesn’t want to try. He just wants it to be over. So clearly I’m crushed and panicking because I’ve been a SAHM and I have absolutely nothing. There was nothing going on, no signs this was coming. I literally asked him how work was and in the next breath he was ending our marriage
 we talked his entire shift at work because I was so confused and I just wanted answers. I wanted him to give us a chance instead of just walking away.

We talked & texted while he was at work. He was very confident and stern that he was done. He was even saying things like “I DID love you” we’ve never gone through break ups or anything. We’ve never been that couple.

I stopped texting him 10 minutes before the end of his shift. He came home and when he walked in he was in tears (first time showing emotion since ruining my life) he hugged me and he loved me. I told him this is making things worse, that’s not fair to me. Then he says “I don’t want to leave. I really don’t” when I asked if she was 100% serious he said “yes. I know this will be harder for you but I want to just pretend like this never happened. I don’t want to think about it anymore. I love you and I’m sorry” 
. I don’t want him to leave. He didn’t cheat, he’s not abusive, he’s a genuinely good man. But
 I can’t forgot. I can’t pretend it didn’t happen. He CRUSHED me. My eyes are swollen from crying literally all night getting absolutely no sleep. I’ll never get his voice out of my head saying “I don’t want you” 
 I don’t know what changed??? He was just in a mood at work and it’s easier to say stuff like that over text? In person he wanted nothing to do with a divorce or leaving. I’m so confused. I want to be with him. I do. I know many of you will think I’m stupid. But I want him to WANT to be with me. He swears he does and he says he was being an idiot and he regrets saying all of that so much
 I’m still so hurt though