Don't assume that you cannot afford a lawyer. I am willing to discuss this by e-mail (email@example.com) or telephone initially and you can then make a determination whether you can afford an attorney.
I do not believe that you should try to answer the foreclosure complaint on your own. You should have twenty days in which to file a response. Contact an attorney immediately and be prepared to provide the date the Notice of Lis Pendens and Foreclosure Complaint were delivered to you. You should also have a copy of the mortgage statement available when you talk to the attorney.