A lobotomy was a neurosurgical procedure which consisted of cutting away most of the connections to and from the prefrontal cortex.
Among Vulcans, repressed memories caused a physical reaction within the brain which in extreme cases could lead to the mind of the patient literally lobotomizing itself. (citation needed • edit)
In 2374, Tom Paris compared the Mari's plans to remove violent thoughts from B'Elanna Torres's brain to a lobotomy. (VOY: "Random Thoughts")