ECT is not a treatment for anxiety, unfortunately. I’ve seen it work wonders for severe depression, mania, and catatonia, but never for anxiety.
Sometimes I’ve seen ECT being used as a “last resort” treatment for people with issues that can only be treated with psychotherapy, like PTSD or borderline personality disorder, but who have been unwilling or unable to do the work over the course of years and the doctors are lost on where to go next. In these cases ECT is almost universally a failure and the side effects are not worth it.
For someone in a manic episode or who’s experiencing catatonia, some memory loss is a small trade to have your life back.