Not so much a book but poems by john keats especially ode on melancholy.

I always believe joy always comes after melancholy and if you dont experience the bitterness you cant appreciate the sweetness.