I'm sorry to hear you're having it bad
You really need to talk to your pdoc , if you're unable to do your job they may be able to help you.
If you need to leave do it properly so you don't get a black mark on your name as that will just make it harder for next time , you could look into how much funding you would get as that would ease the financial burden.
Self medicating isn't the answer - but medicine may be. Are you on any meds at the moment?They might need tweeking , or if you're not on any you might need some.
I hope things turn around for you soon ,
DX : Bipolar , Panic Disorder , GAD , OCD.