Only problem with your story is that you're misrepresenting yourself. You weren't texting him just as a friend - you were sexting. And texting repeatedly during the day. THIS IS NOT FRIENDSHIP so don't be all hurt and pretend that he was a bad friend.
Anyway, you did the right thing ending it. But you're doing the wrong thing blaming him for not being there for you. He's an ex and he doesn't need to be there for you. And if it was just as friends, then you're being one hell of a needy friend. I don't even text my BFF as much as you wanted this guy to respond.
Stop lying to yourself about what this was
Never regret anything that has happened in your life. It cannot be changed, forgotten or undone. So, take it as a lesson learned and move on.