Of all the emotions we are endowed with, nature treats pain as the most important emotion because it is of survival value. Pain is one of the oldest emotions in the scheme of evolution and the nervous system is so designed that it prioritizes pain perception and alerts the brain to pain signals, triggering the necessary approach/avoidance response, because pain translates to a survival threat.
Of course, in lower animals, physical pain is the dominant component of pain. But with evolution, pain has also evolved into a more complex emotion, with physical and mental components.
Happiness (reward) is an emotion that abates spontaneously. We do not make a voluntary effort to escape from happy states. It abates spontaneously so that we continue our quest, defining newer motives and goals. This propels us forward. If not, life would lose its meaning.
However, when it comes to pain, pain does not abate spontaneously. Be it physical or mental pain, the very design of the nervous system is such that it will never let us adapt to the pain until we have removed the source of pain. And so, it is up to us to act and either approach or escape this pain. Because we qualify it as unpleasant, we are forced to find a way out. The drive to rescue ourselves from pain is such a primitive and strong drive that we summon our deepest resources to deal with pain. The arousal effect on the brain (especially the primitive, lower brain) is so strong that it will often succeed in retrieving from our unconscious (lower brain) resources that are made accessible to consciousness (cerebral cortex).
The unconscious of ‘artists’ is often an abyss into which an entire universe is tucked in from the world outside- a universe with abundant beauty. The cortex now translates these resources into insightful and meaningful data. And thus, the artist takes new paths and stumbles on new discoveries, born out of the dire necessity to relieve himself of the depth of the pain he feels. And that is why they say the greatest works of art are the result of the deepest pain. Simply because nature endows pain the ability to create the strongest drive/motivation within us.
Happiness has its essential role, no doubt. It is indeed the happiness we have tucked in that briefly contrasts with the deep pain we feel and translates into art. The depth of the pain we feel suddenly makes us sensitive to this contrast and to the abundance in that little drop of happiness, so that we finally learn to translate its true value in words or whatever our medium of art may be. Like the tiny glow of a firefly, whose tiny flicker becomes the light of the sun in the darkness of a night where there is no moon, there are no stars and there are no lamps or lanterns!