From a more scientific standpoint, it has been argued that melancholy music is linked to the production of the hormone prolactin, a chemical associated with the curbing of grief. When listening to "The End" by The Doors, for instance, your brain's pituitary glands will release the hormone in anticipation of the traumatic event that Jim Morrison builds to—the fictional parricide. The brain is essentially preparing you for this event actually happening. When it doesn't materialise in real life, the body is left full of pleasure-inducing opiates with nowhere else to go, leading to a feeling of elation and happiness. Similarly, listening to any type of music will cause the release of dopamine—the hormone associated with activities such as sex, drugs, and eating, which will induce similar feelings of happiness.
Brown, S. (2017, February 10). A ballad a day… the secrets of music psychology. Retrieved from www.varsity.co.uk