Anyone ever gone on mat leave/disability early due to depression?

I've suffered from depression/anxiety for years. Majority of my immediate family has. On meds, in and out of counselling etc. This is due to some unfortunate circumstances in life/childhood as well. Because of this, I'm high risk for post partum. Well I'm 26.5 weeks now and being at my job just makes me miserable and depressed. Sick to my stomach depressed. I do nursing, so I know too the bigger and further along I get, the harder it will be physically for me. Our unit is insanely heavy and understaffed. Don't get me wrong, I realize this is many places the case. Not just my unit. However, I'm not sure what to do anymore. I'm starting therapy again and am on meds and my md is aware. But part of me wants to go off work earlier than usual because I'm really quite worried about how down I've been.