Go to court right away. File a post eviction order to show cause. Ask for access to get your belongings.
Show proof that you will have the money. Ask for access to get belongings, documents, and medications.
The judge can order the landlord to keep the apartment for you and give you a chance to pay the back rent you owe.
You may be required to pay legal fees or marshal fees.