When we are unhappy, it is because we have lost sight of the Dharma. When the Dharma is lost, afflictions arise. When the mind of gain and loss, calculation and comparison, the notions of self, others, sentient beings and lifespan arise, afflictions naturally follow.