Lobotomy and electroshock therapy have an undeserved reputation as being barbaric and futile. We've substantially refined both techniques and we still use them where other options of failed.
In the case of lobotomy, we now use stereotactic guided procedures to precisely ablate small parts of the brain, mainly for the treatment of severe OCD and treatment-resistant depression. In the case of ECT, we perform the procedure under full sedation and use EEG monitoring to deliver the minimum possible energy. Both treatments still carry a substantial burden of side-effects, but they work when nothing else does.
The uncomfortable reality is that a lot of people have debilitating, life-threatening mental health problems that don't always respond to medication or psychotherapy. Most of us don't want to think about what very severe mental illness really looks like - the person who is too depressed to sit up in bed, the person with OCD who picks at their wounds until they hit bone, the person with mania who is keen to test their belief that they're immortal. If you were treating a patient with that level of disability, what would you do?
The real disaster of psychiatry isn't the failed attempts, but all the stuff that we don't yet know how to treat or don't have the resources to treat. Mental illnesses are the single biggest cause of disability in the developed world. There's so much we could be doing, so much we should be doing, but we're not spending nearly enough on research or treatment. We're watching helplessly as people live short, miserable lives because of diseases that are treatable or potentially treatable.