Theragen was a chemical compound, initially developed as a nerve gas by the Klingons. In its pure form it was lethal, but when diluted with alcohol it could temporarily deaden certain nerve inputs to the brain, having a calming effect on an insane and/or abnormally enraged person.
A theragen derivative was first used as an effective treatment on the crew of the USS Enterprise in 2268, following an extended interaction with the effects of interphase space. Leonard McCoy, the ship's chief medical officer, discovered how to use the theragen derivative to ameliorate the baneful effects on the crew long enough for the Enterprise to complete her mission. The medicine is now listed in the Starfleet Medical Database. (TOS: "The Tholian Web")