Sorry you are having a bad time with the anxiety and depression.
I have been in a similar situation to you with my job earlier this year. I started with anxiety first, because the job was so stressful and I wasn't enjoying it at all. Then a close friend of mine died suddenly and so I soon became depressed. I had to take almost a month off. In that time I went to my doctor, he didn't put me on medication, as I wanted to try to get through it without if I could.
I was very depressed and it was then that I found this site, which helped me a lot. Despite having to deal with grieving for the loss my friend, I was aware like you that it was the job that was having a big impact on me. I then decided to use the occupational health department at work, I knew it was confidential and they were brilliant with me! They also recommended that I seek counselling to help with the greiving process, which I did.
Do you have a occupational health department or someone you can speak to at work? Could you take some sick leave to think things through as I did? Do you think that you may need some sort of counselling to help you through as well as the medication?
I eventually decided that I had to get out of that environment and I became determined to get another job. When I did go back to work, (Which I was dreading) I was suprised at how supportive they were with me. I think it was due to the fact that my sick note had work related stress on it.
You may find that work may offer you support if you are honest with them. Obviousely I don't know your circumstances, but it's worth a try.
I eventually applied for another job 3 months later and got it. I am feeling much better in myself, but still get depressed after everything that has happened. Although I feel that I'm able to cope much better than I did before. I won't say it is easy, but I am getting there and you will too.
You may feel like you can't cope, but try to stay positive, you will get through it.
I hope this helps you a little.
Take care for now
"Kind words do not cost much. Yet they accomplish much."