Unlike what D. says you cannot take the buyer to small claims court according to the terms of your contract if you used the legal New Mexico contract RANM form 2104 and would need to consult an attorney. If it is decided you are entitled to the Earnest Money back you can recover your court costs and attorney fees. But this is a long and lengthy process. The Earnest Money can be held by the Title Company for Years.
David is absolutely correct. The buyer must have notified you in writing within 2 days of this occurance or they may be in default of the contract.
It appears that your agent did not monitor those deadlines so I would look to them first for an explanation of those oversights.
Both parties do have to agree on distribution of the Earnest Money. Hopefully the buyer will be of good faith and recognize their part in this failure of the transaction. But people get "weird" when it comes to "THEIR" money!
It sounds as though you have not filed the appropriate paperwork yet. Insist that your agent provide that documentation for your signature immediately. Pray for a rational buyer and if they prove not to be, realize that a lot of that money will indeed be expended in legal fees.
After this is all over, I would have a stern discussion with your agent's broker asking why your agent did not insist that the ongoing accountability during escrow be met by the buyer.
I have some concerns:
First, has the buyer removed all the contingencies, particularly the loan contingency? If he has NOT removed that contingency, then (check with your Realtor or an attorney on this), he can cancel with no penalry (normally).
Second, if he has removed the loan contingency, he has probably removed all the rest. It is now a question of "failure to perform". Without the downpayment the lender will not fund the loan.
Third, normally the earnet money deposit is use dto open escrow, then an additional downpayment is made within a certain time frame as an "additional deposit subject to liquidated damages". This is something that your Realtor should have been watching.
Was there are question "Gee, I wonder if tthe buyer has the deposit?" or "The buyer did not provide proof of funds for the deposit, heads up!" A sharp Realtor keeps track of things like this to avoid nasty surprises. In other words, it should be be evident to competent people until the last minute that there is a problem.
Consult an attorney for clarification.