If you conclude you cannot afford to stay in your home even with a modification of your loan, negotiate a plan with your servicer in which you have some time to find and move into alternate housing.  Some will permit you to stay in the home until a mutually-agreeable date, or will pay you a small amount to relocate.  Make certain such agreements are written.  Your goal is to maintain shelter for yourself and your family, but in a situation that is affordable, and to minimize the harm to your credit rating.