If you do decide to take time away, you are allowed to take up to 12 weeks of leave under the Family and Medical Leave Act for your own serious illness or that of a family member. You can take FMLA in large blocks of time or in smaller increments within the workday for appointments.
Here is a link to more information about how the law works:
http://www.aaupaft.org/pdf/FMLA.AAUP.UnionGuide.pdf
It's a university union website, but the law is the same.
I've taken FMLA for mental illness for both myself and my daughter, both on a long-term and intermittent basis. The time away has always been helpful, not just for the treatment, but to give me some distance from the daily grind and help me put things into perspective and see what my options were.
If you do decide to leave work, be sure to look into Social Security disability. Your benefit would increase by 50% because you have children under 18. Something else to consider looking into is whether or not your teacher's union contract provides for a disability retirement option. I was recently approved for a Federal employee disability retirement that I didn't know was available to me until I stopped working.
I hope the med change will be just what you need to get through this rough spot. But consider looking into intermittent FMLA for those appointments at least.