Percy Bysshe Shelley said this quote
“ Sorrow, terror, anguish, despair itself are often the chosen expressions of an approximation to the highest good. Our sympathy in tragic fiction depends on this principle; tragedy delights by affording a shadow of the pleasure which exists in pain. This is the source also of the melancholy which is inseparable from the sweetest melody. The pleasure that is in sorrow is sweeter than the pleasure of pleasure itself. ”