It feels like the world is ending when you break up with someone so significant. Everything seems worse.
I've heard many stories where the grind of a PHD breaks people.That stress must make this harder.
You're probably doing way better than it feels. You're in a PHD program to start. Academically that puts you in a very small percentage of the population. Just to make it that far shows you're smart and hardworking.
You're only 28. I know it feels scary when you're 20s are near the end but you are so young. I didn't get married until I was 34. You have lots of time to develop relationships. Many haven't even had one serious relationship at 28.
I know this must feel terrible but your current rock bottom is higher up than many people will ever get to. You are doing great and your future looks very bright.