I know it's hard, but if it wasn't meant to be, then it wasn't meant to be. It was his choice. If you feel guilty, don't. If you feel sad, don't. You love him, but don't feel sad for him. He has hurt you. As you said, he is sexting this other girl. You cannot trust him, therefore you cannot love him. If you love him, it will only hurt you. This person does not deserve you. He doesn't care about you. If he did, he wouldn't have done all of this stuff to you. You can find someone that does care about you, so be happy you don't have to put up with this crappy person anymore. You just need to get your confidence back.
I know you are going to be thinking about them, that's ok, but understand, it's over. There's no going back. There's not point worrying about what went wrong or why he stopped caring about you. It's done. It's over. Whether you have anxiety, depression or whatever, he does not care. The only way to get better is to move on. I know you don't want to hear that, but it's for the best. There are better things to live for. I know maybe it feels like crap to be single, but when you learn to live for yourself, then you can find yourself and then you can become a better person. And when you become a better person, you can find a better person than this *******, and live a happy life.
----recently went through a bad break up as well. Like, literally two weeks ago as well so I know how you feel.