First, I work in Human Resources and if you are in the US, that's a big NO NO NO to it being acceptable for your manager to telling you you have mental problems and you should report him/her to your HR immediately. I can't see it being ok in any country but I'm only familiar with US law. It isn't right or nice and it sounds like you are being bullied.
Second,
I totally feel your pain - I have a very stressful job and a very tough boss - she doesn't tell me i have mental problems but she is all over me all the time and always changing her mind about stuff - texting me way early in the morning, doesn't give me a chance to catch my breath, and when i say anything to her, she yells at me - i'm a grown woman with a LOT of experience - i don't need this - (I also think my boss might be BP)
but i also need my job, need the money, can't quit and have been having panic attacks on am almost daily basis.
What i've been doing to cope at work is taking things a little bit slower, and writing everything down, which i never had to do before but it's helping. i also try very hard not to argue or question my boss, whether I want to or not - i just take a deep breath and say "yes' or "ok". I keep telling myself it's just a job, it's not personal and i can go home in X amount of hours. If it gets really bad, i excuse myself and go to the ladies room for my panic attack or outside if it's really bad. it's not a perfect plan, but it's what i'm doing till i can figure a way out of this situation.
i really hope it gets better for you soon.