If a bad debt has been written off by a VAT registered business, the VAT on the original sale can be reclaimed. The debt must be older than six months and less than three years and six months.
You include the VAT on the bad debt in input VAT (box 4) of your VAT return.