You may have heard of alternatives to foreclosure, such as short sales, and deeds-in-lieu of foreclosure. All of them are “not paid as agreed” accounts and will impact your scores the same. This is not to say that these are not better options for you from a financial point of view.
Bankruptcy may have a greater impact to your credit score. A foreclosure is a single account that you default on. However, declaring bankruptcy may affect multiple accounts and has an opportunity to have a greater negative impact on your credit score.