Those that are wretched in the full sense of word are those that are bereft of the treasure of faith. They are always in a state of misery and anger.
The only means of purifying the heart and of removing anxieties and worries from it is to have complete faith in Allah, Lord of all exists. In fact, there can be no true meaning to life when one has no faith.
Whoever works righteousness, whether male or female, while he is a true believer; verily, to him We will give good life [in this world with respect, contentment, and lawful provision]. And we shall pay them certainly a reward in proportion to the best of what they used to do [i.e. Paradise in the Hereafter].
(Qur'an 16: 97)
The 'good life' that is mentioned in this verse refers to having a firm faith in the promise of our Lord and a steady heart that loves Him. People who lead this 'good life' will also have calm nerves when afflicted with hardship; they will be satisfied with everything that befalls them, because it was written for them, and because they are pleased with Allah as their Lord, with Islam as their Religion, and with Muhammad as their Prophet and Messenger.