Talk to your doc / therapist, you might be able to extend the medical leave.
Apartments may take into account your bank account balance as something that helps your approval.
If you decide to stay and do the PIP project, realize that it's really about putting a good plan together and executing to that plan, communicating when the plan has a problem etc. Try to remove ALL the ambiguities in the plan before building whatever it is and design each part at one level below where you'd normally do it to make sure you don't have things that come up that surprise you. Everything other than your PIP work doesn't matter - no CRs, no help with design specs, oncall, nothing. Make sure to get sleep and exercise - if you combine stress with lack of those two things you just make things doubly bad.
If you do pass the PIP, change orgs immediately. You need a new start without baggage (my mistake was I got re-orged under a manager that was instrumental in trying to PIP me previously, and then I stuck around to finish my current project instead of immediately leaving).