If you bought the time share for personal use, then just as in the case of a sale of a principal residence, no loss is allowed. If you bought the time share for investment purposes, you may be able to take the loss as a long-term capital loss.
When debts are cancelled in bankruptcy cases, the cancelled amount is excluded from gross income. Tax attributes are certain losses, credits, and property basis that must be reduced to the extent of the exclusion.