Usually you are put under before ECT. It does create an artificial seizure. According to a doctor who presented at my bipolar group, this seizure changes the brain chemistry and gives the brain a chance to restart, hopefully using a more healthy set of chemical interactions.
They do this to hearts, too, only the problem there is electrical signals. Sometimes hearts get out of rhythm, and they stop them, then restart them, hoping they will go into proper rhythm and stay there. They did this on my father a couple of times, but his heart kept getting out of rhythm, so they gave up, and he’s been living for years on “half” a heart.
Brains also may or may not start up properly again. Sometimes, in the process, you lose memories. But the chance of getting rid of depression and the urge to die make ECT seem like it would be worth the chance. It helps some small portion of people with brain chemistry issues. It is usually used after meds and therapy have failed to work.