Why do you want to write it off? Its better to repay this than take a salary or a distribution on wind up. Maybe your winding up the company. If you are, this can be converted in a capital gains loss and carried forward.
It really does not make sense to wirite off.