I know very little about the courthouses in your area, but in my neck of the woods a post-dated prescription would not provide much, if any help to your matter. So I suggest contact an attorney or two in your area. Many offer a free consultation so I recommend meeting with many.
The response above is not intended as legal advice since it’s impracticable to provide thorough, accurate advice based upon the query without additional details. It is highly recommended that one should seek advice from a criminal defense attorney licensed in your jurisdiction by setting up a confidential meeting. Moreover, this response does not constitute the creation of an attorney-client relationship since this message is not a confidential communication because it was posted on a public website, thereby publicly disclosing the information, which is another reason to setup a confidential meeting with an attorney.
You did not have a prescription at the time and that is all that matters for the criminal case. If the medication is medically needed then you should absolutely go to a doctor and get the meds prescribed so that you are not tempted to possess them illegally in the future.
If you do suffer from anxiety and have a good reason why then absolutely tell your attorney as though could be mitiagating facts in the eyes of a reasonable prosecutor.
Mr. Cernyar is correct that getting a post-dated prescription won't help anything. In fact, it will probably make things worse. Beyond that, you don't provide enough facts to provide an answer. For instance: Were they your pills? Did you know they were there? Do NOT provide this information on Avvo or anywhere else except to an attorney in confidence. Consult an attorney in your area immediately.
The response above is not intended as legal advice. This response does not create an attorney-client relationship. Legal questions can only be fully answered through consultation with an attorney to whom you give full and accurate details. Anything you post here is not confidential and is not protected by the attorney-client relationship. It is highly recommended that you seek advice from a criminal defense attorney licensed in your jurisdiction by setting up a confidential meeting.