Exposing bad memories can have a bad reaction too... such as what you are experiencing... kind of like the generalized anxiety disorder..only it's generalized crabbiness disorder? no... not really... but it can make one feel out of sorts....for a while.
Be easy on yourself. Push yourself if you can, but in small time increments. Tell yourself, you will get up and study for 15 minutes, and then do so. Do your best.
Lots of students lose a semester of credit due to not being able to cope... life goes on... you recover the courses one way or the other... etc. Try not to catastrophize... you aren't "screwed" academically. You do have many ways to cope, so choose some good ones. Try to distract your mind off yourself and your bad thoughts... but not necessarily with studies! My that's a long time without a break
I'm sorry your T is leaving. I hope you aren't feeling abandoned.
Hopefully the Pdoc will continue to be alert and help you.