Oh, sweetie. I am so sorry. My husband walked out on me too, and I loved him. Years later, I am still sad that it couldn't work. But when someone doesn't want us, we just have to accept it. There is nothing we can do about it, and we cannot control it. Your best bet is radical acceptance. The book "Let Them" by Mel Robbins is quite good on this concept.
You might also want to check out Chump Lady. chumplady.com. She's an inspiration.
One of my friends was happily married, but over a few years, her husband met other people and eventually left her - two weeks before Christmas! Sadly, it happens, and it happens to a lot of people. It's truly awful, but at the end of the day, we don't want someone who doesn't want us, do we? If they think so little of us, then fine. We will find someone who does appreciate us.
It will take time, OP. Lots of time.
It happened to this lady:
And there are more channels like this on YouTube, too. There is also a great book by Vikki Stark called "Runaway Husbands: The Abandoned Wife's Guide to Recovery and Renewal." She asked her husband if fish was all right for dinner, and he said, "I can't do this anymore." Her first thought was, That's a funny way to say you don't like fish.
Another woman who was famously left out of the blue is a New Yorker called Belle Burden. She and her husband had been planning their new garden the day before. She also wrote a book about it.
My point is, you are FAR from alone. The world is full of weak, flighty men who are utterly incapable of sustaining a lifetime commitment. They're pathetic and may well end up alone and regretful, with compromised relationships with their children.
One day at a time, OP. You'll get there, as millions of women before you have done. Sending hugs. 💐 Be kind to yourself.