Should your customer request the Deposit be refunding you would do that by going to the Write Checks and select the bank account that you deposited the funds into. In the Line Item Detail you would enter an account that you have created specifically for when this situation happens such as 2-2222 - Returned Funds account. Then you would post and print your check to the customer.
To back this item out of the Receivables you would go into the Customer Payments form and select that customer. Use the Returned Funds Account and the Bank Account in the account area. That will remove the item and all references to it.