When your debt is forgiven, you have to consider the amount written off as an ordinary income item (with the exclusion of the debt originated from the purchase of primary home).
If you're trying to write the debt off from your taxes - then it won't work. Even if you can expense the debt forgiveness, you will incur tax liability on your personal taxes side, and in addition you'll be out of cash in your business. So basically you'll end up paying it with after tax money, exactly the thing you're trying to avoid.
In addition, you're dealing with related persons here, which means that the loss deduction might not be allowed (depends on the actual details of the transaction), so you might actually end up paying more taxes with this scheme that just paying off the loan directly (if your business pays taxes separately from your person).
A loss on the sale or exchange of property between related persons is
not deductible. This applies to both direct and indirect transactions,
but not to distributions of property from a corporation in a complete
liquidation. For the list of related persons, see Related persons