Rebbe Nachman teaches us that the main reason why people are far from G-d and do not come closer to Him is because their minds are not settled (yishuv ha’da’at) and they do not pause to consider the purpose of their existence. The most important thing is to reflect upon oneself what is to be gained from all the desires of this world. Then one would certainly return to Hashem.
Someone who is anxious and depressed finds it impossible to direct one’s thoughts where one wants. It is hard to reflect upon oneself. Only with joy can one direct one’s thoughts wherever one wants and settle one’s mind.
Joy is the world of eternal freedom – “for you shall go out with joy” (Isaiah 55:12). Through joy we become free and leave our exile. When a person maintains a joyous attitude, one’s mind and thoughts become free and one is no longer in exile. The person can then direct one’s thoughts as one wants and settle one’s mind so as to focus on one’s goal and draw close to Hashem. (Likutei Moharan II: 10)