Your best bet is to try and avoid the foreclosure...I'm sure you've already tried traditional measures, like scrambling to bring the loan current etc.
Have you thought about performing a short sale on the property?
A foreclosure sticks on your credit report for up to 7 years and has a much further negative impact then a short sale. They can also come after you for the deficiency, whereas a short sale you might be able to get them to waive that.
Give me a call at (208)284-0829 to discuss this in further detail and find out if it is right for you.