While sufferers of major depression to the present day sometimes describe their experience as "mental pain," limited attention has been given to one of the major etiologic theories of 19th century psychiatry: melancholia as psychalgia. I illustrate the development of this theory, which arose in the context of the early phases of the application of psychophysiology to mental illness, through German, French, and English psychiatric texts from the 1830-1870s. As clinical pathological correlation became a dominant paradigm in early 19th medicine, nervous diseases stood out as potential exceptions, sometimes demonstrating "pain without lesions" or neuralgia. Tic Douloureux was a paradigmatic example. The first descriptions of reflex actions in the spinal cord in the early 19th century resulted in a range of theories of reflexes in brain that expanded to include "ganglia" that could react to diverse complex social and mental stimuli, and whose actions could impact key mental functions including mood. Theories of neuralgia included a constitutional predisposition and an acute physical trauma producing a hypersensitivity so that normal stimuli (e.g., touch) were misinterpreted as excruciating pain. A parallel framework was conceptualized in the brain to produce psychalgia. A predisposition combined with a mental trauma could produce hypersensitivity in key brain ganglia. This psychophysiological framework explained how normal social and introspective experiences would, in melancholic patients, be interpreted in a distorted manner, reinforcing themes of inadequacy, failure, and worthlessness, and produce a sustained mood state of intense mental pain or psychalgia. I illustrate the development of this theory, which integrated brain and mind-based perspectives on mental illness, through the writings of four major 19th alienists: Guislain, Griesinger, Maudsley, and Krafft-Ebing.