TMS and medication can both help treat depression, OCD, and anxious depression, but they work in very different ways. This article compares how each option works, what side effects to expect, how long treatment takes, and when TMS, medication, or a combination of both may be the right fit.