Bankruptcy is not the ideal option, and you should go for it only when you have exhausted all your resources and when there is no other option left.
You can always consider debt settlement, debt consolidation, etc., to get out of debt.