Assuming your financial situation isn't so dire that there's literally no alternative to bankruptcy, it should always be a last resort.
While it can often feel like your personal circumstances are that much worse than everyone else's debt problems - it's not uncommon for those with tens of thousands of dollars in debt to get back on their feet with a debt negotiation (also known as "debt settlement") program. Generally speaking; provided you're still employed - the amount of credit that's been extended to you is in relation to your income, and that income should be sufficient to work with a settlement company.
With a debt negotiation program, credit counselors will work with your creditors to lower your interest, penalties and payments, resulting in savings typically between 40-60%. This isn't without any consequences - settled debts will have some negative impact on your credit report. Fortunately - it's not nearly as bad as a bankruptcy or unresolved debt, and many programs include credit repair services to be used during or after a settlement plan.
Long story short; as far as your credit and getting back to normal is concerned - negotiation is a better option than bankruptcy when possible.