You should have the contract reviewed by an attorney for validity. Many contracts are poorly drafted or improperly signed even when drafted by an attorney. An invalid contract may be your only possible solution. It would be worthwhile to have the contract reviewed as soon as possible to determine if your deposit can be saved. If the contract is valid then you are bound by the agreement. In that case perhaps the attorney could negotiate with the other party on your behalf to lessen the consequences.
Reminder: A contract is executed in order to create a legal obligation to honor an agreement. One of the main purposes is to prevent one party from "backing out" without suffering consequences. Generally, you can't get out of the contract unless there is an escape clause. For example: "This offer is contingent upon a satisfactory purchase and sale agreement acceptable and approved by the buyers attorney within 14 business days"