This really sucks and I’m sorry that you’re going through it. It’s really tough to put money away for an apartment when you don’t have a stable place to stay or any extra income…
I take it you don’t have any family near enough to sleep on their couch until you can save up? That would be my first line of defense. Otherwise, maybe check around for friends who are looking to move and see if you can work out a room mate deal with them? Have you looked around for people posting ads for roommates? If you live in a city with a large university, that might be a possibility. Grad students are always looking for someone else to share their rent, as they don’t have much $$$ (and extra bonus, they’ll likely not be around much, as they’ll be in the lab, teaching, or in an archive somewhere).
Working remotely from somewhere cheaper sounds like something you don’t have any interest in doing, but that might be an option, at least for a short while. If you can live far enough out and take a cheap place, it might help you get back on your feet enough to move back to where you really want to be.
Once again, good luck! I really hope this all pans out for you in the long run.