There are so many factors that can determine the answer, that it would be impossible to say without more information. In Arizona, typically a first note is wiped out through the foreclosure process, however I would absolutely consult with an attorney that can advise you of the best way to proceed in your situation. You may even want to consult with a bankruptcy attorney in case that may present a good option for your situation. And if you were considering a short sale, I would also consult with a tax advisor to understand the ins and outs of whether that is a good option for you as well. I hope that helps and best of luck to you!
That all depends on the type of note, wheteher or not it was purchase money financing, and a few other legal questions. This is a real estate forum, not a legal forum, so I would HIGHLY recommend that you immediately consult with an attorney.