You should get it back but....since you gave $$ to the landlord they could accept it as compensation for the unpaid damages. there is no specific law on rent overpayments like there is on security deposits.
If the amount is substantial, you should consult with a local real estate attorney
we need additional information. Are you seeking a return of money for a time where you were living in the home? Further, the landlord is going to look to be made whole for his loss. You will need to review your rental agreement and potentially discuss same with an attorney.
DISCLAIMER: This should not be considered legal advice. It does not constitute a contract for legal services between any parties. I give legal advice ONLY in the course of an attorney-client relationship created and defined by a written agreement for services, signed by my client and by me or a member of my firm, for which payment has been made. No attorney- client relationship is or will be established through this answer, and nothing said herein is legal advice. My posts on Avvo in response to the public's questions are never intended or offered as legal advice. Nothing posted by me herein is offered or intended as a warranty or guarantee of the outcome of any specific legal matter. All statements posted herein are matters of opinion, and are expressly limited and conditioned by the fact that I do not know the facts of any individual case. Do not rely on any response posted by me as applicable to your specific problem or circumstances. Answers are given to questions for which there may be additional facts not mentioned which might change the legal issues or consequences.