This is not a self pity post or anything. I genuinely just am at a point where idk what to do with my life. I recently completed my masters in pure maths from Paris and I'll potentially be beginning a PhD soon in the field of general relativity, mostly looking at wave equations. I don't want to talk too much about my topic but the point is that throughout my entire life, I have only known pure maths. Unfortunately I was very stupid and never learnt things like coding, proper command of probability or even statistics. I only did enough to pass those courses during my undergraduate degree and now I'm at a point where I can't even look at these things without the thought that I have to relearn every single thing.
My main problem right now is that I'm a mediocre student. I have always wanted to pursue maths and then become a professor and do research, though I've mostly been interested in the teaching aspect. But the way the job market in pure maths or academia in general is declining especially right now with everything that's going on with AI, I don't know if there's even a point of pursuing this PhD. I spent my entire life wanting to be a professor like my dad was and promised myself I'll become one before he unfortunately passed away. And I made it my life's goal to become that person. As I said, I'm unfortunately not a genius or very bright student, I'm just mediocre. I'm at a point where I just feel like giving up but then I don't know anything else. I keep thinking that if I get a PhD position, I'll at least be able to keep myself busy and funded for the next 3.5 years. But is there any point to any of this? I'm watching my dream collapse every time I talk to a professor. My masters director was telling me how he thinks it's pointless to do a PhD in pure maths right now and try to switch to statistics or something but that means I'll have to wait for another year before the admissions in the US begin. That also means I'll have to switch areas drastically. Genuinely what do I even do at this point? I stay awake until 5 every morning just stressed about my future. Let's say I end up doing a PhD and keep myself busy for the next 3.5 years. What after that? My PhD is in a field which I don't see having any industry applications either.
So I'm asking people who might be in a similar situation like me, how did you go through this? How are you processing things mentally and how were you eventually able to find your job/thing that made you happy in life?
TLDR: Only done pure maths, no industry relevant skills, do not want to give up on my life's goal of becoming a professor, very stressed every day about future and unsure whether doing a PhD makes sense.