But if it too late, what should I do next? I live in California but my home is in New Mexico. The people who rented my home got enviction note to leave the property by September 2. I really want to keep this home. It there a way to do it?
Was the foreclosure wrongful? If so, you may be able to appeal the decision or sue for wrongful foreclosure. As for bankruptcy, there are various options, including possibly Chapter 13, but you should see if you qualify by discussing this with a bankruptcy lawyer. See: http://www.uscourts.gov/services-forms/bankruptcy/bankruptcy-basics/chapter-13-bankruptcy-basics
As for your duties as a landlord in NM, contact a NM lawyer.
More details are necessary to provide a professional analysis of your issue. The best first step is an Initial Consultation with an Attorney. You can read more about me, my credentials, awards, honors, testimonials, and media appearances/ publications on my law practice website. I practice law in CA, NY, MA, and DC in the following areas of law: Business & Contracts, Criminal Defense, Divorce & Child Custody, and Education Law. This answer does not constitute legal advice; make any predictions, guarantees, or warranties; or create any Attorney-Client relationship.