Cooling off periods are not applicable for agreements signed on the traders licenced premises, only if you sign the agreement away from their premises i.e. home or work does a cooling off period apply.
However, that is academic... as at this moment you have not signed any agreement. Until you sign and the authorised signatory at the finance company co-signs to accept, then you are allowed to withdraw without penalty if for any reason the finance deal does not proceed.
The deposit in full has to be returned where a deal that was dependent on finance being arranged through the dealer does not conclude, under what's known as a three way connected lender liability finance agreement. Ask the garage for your deposit and tell them you don't wish to proceed, it's that simple or put it in writing...if they don't co-operate see your local trading standards dept.
Had this been a full cash deal, they would have been allowed to retain some of your deposit to cover any, "reasonable" out of pocket expenses they could demonstrate they had incurred.