Hi and welcome to DWD.
I completely agree with everything that Paula has said. I am also sorry that you're in pain, but you guys have been together for over a year and you say that you are aware of his mental health and this can be a horrible time for so many with the changing of the seasons, the getting dark earlier, the run up to Christmas etc No it doesn't excuse his behaviour at all, and dumping you by text suggests to me that he's not done it because he really wanted to, but maybe because he didn't think he deserves you or you shouldn't be with someone like him. Depression robs people of self worth, self esteem and just envelopes them in a dark cloud....
Again I can't tell you what to do, but is it worth another go to see if maybe what he needs is to see his Dr?