This Is My Faith - Al-fatlawi, Ali - الصفحة ١٢٣ - Is Happiness and Misery from Allah?
heavens and the earth endure save for that which thy Lord willeth: a gift unfailing)١١;١٠٥-١٠٨.
Moreover, there is a Prophetic Hadith reported by Omar:
“Once one is born either happy or unhappy, what would we work for? For what is finalized or yet not finalized?” Prophet (PBUH) replied “For what is already finalized, Omar, as pens were dried and fates were practiced, but all is possible for what created for”.
Both the Holy Verse and the Hadith might give us this impression that happiness and unhappiness are forced on mankind, but the truth is that it is nothing but an invitation to obedience and rejecting disobedience. This is because the Almighty Allah wants happiness for whoever chooses obedience and unhappiness for whoever chooses disobedience, and this notification comes out of His Eternal Knowledge and Will. So, again there is no compulsion in this, and on the contrary, it is free choice that is being only confirmed as both happiness and unhappiness are the result of actions that come out of the doer willingly, and after all, what has been said refers to the next life and not this life.