If you are ready to go into foreclosure, that implies you've had a hardship in paying the current mortgage based on other difficulties- job loss, divorce, death, etc. If that is the case, there is still the option of negotiating with your lender to arrange for either a loan modification or short sale. Both require the same analysis and your lender will want you to consider the loan modification first.
I can show you the analysis that is used in a free one hour consultation. I have done these for 9 years because I wanted to make sure no one was having their home sold out from underneath them when they had the chance to save it. When a person is already experiencing a hardship, the last thing that should happen is they lose their home unnecessarily. Here's the gist of it- analyze your income and expenses. Your personal expenses need to be about 40% of your gross income. If they are, the loan modification offer will most likely be about 31% of your gross income for all housing expenses (Principal, interest, taxes, insurance and HOA) If those numbers won't work then you may be looking at a short sale. Either way, the lender WILL NOT FORECLOSE while you are being considered for a loan mod/short sale. AND it's the same paperwork for either option as I said.
The challenge when you're already stressed is seeing the numbers clearly for what they are. There are resources that will help you see the numbers and how the lender will be looking at them. I am one of those and there are others such as attorneys that I can refer you to.
Whether you decide you want to work with an investor or not is still an option as well. There are some that are honest, but others that are not, which is why there are so many laws passed by Pam Bondi about this issue. If you decide you're going to consider their option, then I suggest that you speak with an attorney. One hour can protect you and will be worth the money. I have some resources there as well.
Get informed, and you will be okay.