That sounds like my GP. I struggle with anxiety, depression and obesity among other things.
Every time I go to an appointment with them I hear "Well, it's all in the head you know."
I hate this and it's the case with most GPs, at least in my country. I genuinely just wish my therapist was also my GP.
It's particularly malicious as it's using a phrase that is literally true and accurate description of the problem to dismiss the existence of the problem!
Can you opt for a second opinion? Like, is that legally possible to be enforced? If yes, I'd go for that. If you have trouble functioning in society, a diagnosis plus therapy or medication can really direct you in the right way. You still have to put in effort, of course, but basically less because these aid you.