If your husband seeks to obtain your medical records by subpoena, you can file a motion to quash his subpoena and a motion to keep your records under seal pending a hearing.
You should send a letter to your therapist advising her or him that no permission to release your records without a court order is granted by you under HIPPA. Advise your therapist to only send the records to the court if an order or subpoena is served on them, and under no circumstances should records be given your husband, his attorney or any agent for them. This includes not sending them copies of what the therapist sends to the court. And if the records must be sent, send in a taped package with a letter asking the court clerk who opens the package to retape it closed and initial over the tape until the judge reviews. Then, as soon as your therapist advises you of the subpoena duces tecum, immediately file a motion to quash.
Also, ask the therapist to give you a copy of your records now and all billing records so you can properly prepare for your motion to quash hearing.
The mental condition of the parties is a relevant consideration in custody cases, so mental health records can be subpoenaed. How useful old records will be is a question for the judge to evaluate.
Past treatment for depression - or even current mental health treatment - does not make a person an "unfit parent." Sometimes, it is the the lack of treatment, when needed, that is more relevant on that issue.
This answer is for general information purposes, is not legal advice and does not create an attorney-client relationship. If you wish to schedule a consultation regarding your particular case, please call (757)533-5400.