Getting over someone is always difficult. Especially when you have been apart of each others lives for so long. Also being dumping someone over text is a very cowardly way of doing it. think about that when you start to miss him; he didn't respect you enough to come and speak to you about breaking up. It will take time, and unfortunately you will hurt for a while. It does get easier though, and you will move on. Try and keep your head held high and show him you're better off without him, even if you don't feel it. Let him know what he is missing out on.
different people cope with breakups differently. Without knowing more about the situation we can really only give general advice, but here are some things that I have found helpful. First take your time, you were together for a while and feelings are complicated when another person is involved. take your time to figure out what you are feeling and possibly plan a bit for the future. Its scary when something serous ends sometimes we plan parts of our lives around a person so it's scary when it ends, often its best to relax and realize prioritize things. Next Feel whatever you are feeling for a few days. My friends and I normally set a time limit based on how serous the relationship was, the basic idea is that you have enough time to feel the emotions but not so much time that you wallow in the emotions and sink into a self feeding cycle. Even when the mourning period is over (for me its usually been around a week) the emotions are still there but then its best to try to move forward with your life in one way or another. Put some energy into moving your life forward and keep moving, hang out with friends pick up a hobby do something you enjoy. all in all feel what you need to feel without letting it drag you down. Maybe some friends who know the whole situation could give some perspective? Other then that I hope it begins to look up for you soon. And remember these things tend to work out in the end, just not always in the way we expect.
My advice would be not to make this a big deal (even if it is). You should move on, relax, distract yourself and maybe even start seeing someone else. Many women get drunk with their girlfriends, well, you can do that, but I would not recommend it (for obvious reasons).
The best way is to let your ex go as easy as he did. You can write him a message like "I understand. I hope you have a good life". Even if you would not want him to have a good life, write that anyway, it will give you extra release.
If someone dumps you like that, it means he did't love, which is why you should care less.
I hope my answer helped you out a bit. Good luck!