Fyodor Dostoyevsky said this quote

…but it is in despair that the most burning pleasures occur, especially when one is all too highly conscious of the hopelessness of one’s position.