Is it wrong to take time off of work due to you having anxiety or depression? Did I go about telling my manger in the wrong way?

I have been having issues with anxiety for the past year because I recently left an abusive relationship and it was hard to get out of it and then I left and went to a different state just to get away from him and started working so the new environment, new job, still healing from the pain he caused physically, mentally and emotionally, I have bad panic attacks at night and I kept it from HR and my supervisor and attempted to work through it up until yesterday. It just got worse to the point I made myself sick. I don’t/haven’t gotten any sleep but I have been working through it. All last week it was messing with me and yesterday as well but still worked all last week and yesterday but this morning I got up feeling no better (I started feeling worse) so I informed her that I wouldn’t be able to come in today but the way my anxiety and PTSD has been triggering me lately I don’t think I can even work the remaining of the week. That’s when I sent this text after already calling in for today. I’m suppose to be starting therapy soon as well.
Is it wrong to take time off of work due to you having anxiety or depression? Did I go about telling my manger in the wrong way?
Is it wrong to take time off of work due to you having anxiety or depression? Did I go about telling my manger in the wrong way?
Post Opinion