If a creditor, for the payment of whose debt property shall be sold under a deed of trust, shall become the purchaser at such sale, he shall be entitled to credit the amount of the purchase money against the debt, and shall be only required to pay to the trustee the excess of the purchase money over his debt, together with such additional amount as may be necessary to defray the expenses of the sale.
D.C. Code § 42-817