In such an instance you really want to rely on your own real estate agent and / or your own attorney. Going to the internet to ask for free advice is not the way to go here.
It's doubtful that the earnest money issue would create a material breach of contract and allow you to withdraw from the transaction. Perhaps the better argument is misrepresentation: he claimed to be a real estate broker, and you trusted him and relied on his expertise because of that, and you find out he is not. (However, one can still be a real estate agent/broker without being a Realtor.) So, I believe my colleague is correct in advising you to speak to an attorney and go over the contract itself, as well as the law governing earnest money deposits. An attorney would be able to look over your contract and find out if there are any ways you may withdraw from the deal without being liable.
The answer to your question is not intended as legal advice or counsel. Because of the minimal facts involved in question and answer formats, the answer given serves as only that. No representation is created by the answer and comments given to an individual question. And you are advised to seek legal counsel in your specific area for a more detailed analysis and guidance on your particular situation.
I agree with my colleagues:
There is enough at stake that you should ask a real estate lawyer to render an opinion concerning your rights and obligations.
This information does not constitute legal advice and does not establish an attorney-client relationship.