They are both bad for your credit but whether bankruptcy or foreclosure is the way to go will depend on your circumstances.
With foreclosure, you are definitely going to lose the house. Your credit is going to take a hit, but it has already taken a hit since you have not paid the mortgage. The real issue is whether Michigan allows the bank to come after you for a deficiency judgment. If deficiency is allowed and if you have sufficient assets that make an action attractive, you may have to file bankruptcy unless you can negotiate a settlemet of the deficiency.
The foreclosure will stay on your credit for seven years from the date of the foreclosure sale. Things will start to get better in terms of your credit (barring any other defaults or delinquencies) within 2-3 years.
Bankruptcy has its own consequences. I am not licensed in Michigan, but if you qualify to file a chapter 7, then you will need to figure out a way to get current on your house note if you are delinquent. Otherwise, the lender will either wait until your bankruptcy is complete and then foreclose or they will move to lift the automatic stay and foreclose. Howeever, they will not be able to get a deficiency judgment against you if the mortgage debt is discharged.
If you want to keep the house then you will need to file a chapter 13 bankruptcy. The chapter 13 allows to you to get caught up if you are behind. Under the chapter 13, you make payments to the bankruptcy court over a 3-5 year period (length of time will depend on the debts). The problem that I have encountered in my practice is that many people cannot afford the bankruptcy payments. If you miss a payment, the bankruptcy court dismisses the bankruptcy and you are right back wher you started.
With the chapter 7 bankruptcy, the bankruptcy is reported and will repain on your credit report for 10 years from the date the discharge is granted. A chapter 13 can stay on your credit report for 7 years after the discharge is granted. However, remember that the payment plans are 3-5 years in length, so that really means that a chapter 13 stays on your credit 10 to 12 years.
And if you file bankruptcy and then it gets dismissed for any reason, the fact that you filed is still on your credit.
Within 2-3 years after you emerge from bankruptcy, things do get better. you can start to rebuild your credit immediately.
I don't know whether Michigan is a non-judicial or judicial foreclosure state. If judicial, then there are things that you can do to drag out the process and allow you to remain in your home for a period of time. In such case, I think it would be a good idea for you toconsult with a foreclosure attorney. Learn about the foreclosure process, whether it is judical or non-judicial and whether Michigan allows a deficiency judgment. Beware of out-of-state attorneys who want to charge you thousands of dollars for this. I know that legal work costs money, but chances are that if you had thousands, then you would not need an attorrney as you would be able to pay your mortgage. You may even want to talk to a HUD-approved housing counselor at a non-profit consumer counseling agency. You can check out www.nfcc.org or www.hud.gov for an agency. There may be programs in your state designed to help struggling homeowneres and you will not know until you talk to one as to what is available.
You also need to get a consult with a bankruptcy attorney in your area. Many attorneys give free consults and I would encourage you to get the consult and learn more about bankruptcy in Michigan. Just because you get a consult does not mean that you have to file. Filing bankruptcy may costs arouynd $2000 for a competent bankruptcy attorney (although the rates could vary a bit).
Well, first, you have to be able to pay for your house in order to keep it. If you are current now, chapter 7 would work to get rid of other debt. If you are not current, chapter 13 would let you make your regular payment plus a little bit more, as long as you can catch up in 3 to 5 years. You should really not be concerned about your credit. If you are not able to pay what you have borrowed, there is not much that can be done to show lenders that you are able to do what you cannot do. If you have to ask, your credit is toast already, and you should be living off the cash your job produces for a few years until the credit grantors are comfortable that you can live within your means.