These are issues you should discuss with your lawyer. They could only bring up these matters if they were relevant to the case. If you testify, and if a judge deems your mental illness to be relevant to your credibility as a witness, you could be questioned about them. Again, your lawyer is the best person to address these issues and to take steps to keep these issues out of the case.
This answer is provided for educational purposes only and is not intended as the practice of law in any jurisdiction in which I am not licensed. The answer does not constitute legal advice nor does it create an attorney-client relationship. The answer is based only on the information provided, and may be inaccurate in the context of additional facts that have not been provided. The questioner should be aware that I am only licensed to practice law in the state and federal courts of Minnesota. Accordingly, before taking any action or refraining from taking any action, the questioner should consult with an attorney licensed to practice in his or her jurisdiction.