This is a very long and difficult question, however I will try to give you some insight from a joy/sorrow perspective:
Rebbe Nachman teaches: The Psalms (Tehilim) – the Ten Types of Song – have the power to nullify the kelipah (the impurity) of the Other Side. The most destructive impurity is “wasted seed” which is caused by the kelipah known as Lilit.
Psalms has the power to subdue that impurity and rectify it as indicated by the fact that TeHILiM has the same numerical value as “LILIT” (adding five for the letters of the name) (Likutey Moharan I, 205).
For every sin there is a prescribed rectification. To repair spiritual damage caused by a particular sin, we must apply the particular remedy appropriate for that sin. Yet the task when each sin is tackled individually, is more than we can hope to handle. Nevertheless, as Rebbe Nachman taught there is a general rectification. This General Remedy has the power to rectify all sins (Likutey Moharan I, 29:4). The General Remedy consists of the Ten Types of Song. Any ten chapters from the Book of Psalms includes the Ten types of Song, however, it is the ten chapters specifically prescribed for the rectification of wasted seed that are known as the General Remedy. These are: 16; 32; 41; 42; 59; 77; 90; 105; 137; 150 .
By reciting these Ten Psalms, one can rectify all the spiritual damage caused by wasted seed and all one’s other sins, and then come to repent (one should first immerse in a mikvah if possible) (Rabbi Nachman’s Wisdom #141)
The Hebrew word for Psalms, Tehilim, has the numerical value of 485, which is equivalent to that of Lilith, the name of the evil spirit appointed over the kelipak which captured the seed. While reciting the psalms, one should keep in mind that the word Tehilim, numerically 485, corresponds to the two divine names Eil and Elohim. It is these two names which have the power to release the seed from the kelipah. The seed embodies the divine’ attributes of chesed-love, and gevurah-strength, because the seed contains the power of fire and water, heat and liquid, and these correspond to love and strength. Through the two names El and Elohim, which refer to chesed and gevurah respectively and which are numerically equivalent to Tehillim, the seed is released from there.
When gratification comes, it can never truly satisfy.
Because what is really driving the individual on is a gnawing dissatisfaction with himself, a sense of depression and frustration caused by the awareness deep down that he is not fulfilling himself as God wishes. He seeks solace for his dissatisfaction in superficial pleasures, but they only make him more frustrated, driving him on further. This is why the futile search for gratification can become so compulsive, dominating all of a person’s thoughts, his speech and his actions. The whole complex may be buried beneath a surface veneer of “contentment.” But because he fails truly to fulfill his role in the scheme of things, he is far from the experience of genuine joy. God remains hidden from him.
Rebbe Nosson adds insight:
But when a person sins it is because he is pulled by this-worldly desires, and he uproots himself from God. Not only does he fail to join the created world to its root, he is the “whisperer separating familiar friends” (Proverbs 16:28-see above), for he separates himself and everything in the world that depends on him from God. Instead of being merged with the side of holiness he takes himself over to the Other Side.
It is because the Ten Psalms of Rabbi Nachman’s Tikkun contain the Ten Kinds of Song that they have the power to transform sadness and sighing into joy. This is why they are the remedy for sin. And the remedy will be complete with the coming of Mashiach, for then the joy will be very great. King David himself was the Messianic king, and it was because of this that he devoted his life to the songs in the Book of Psalms, all of which are founded on the Ten Kinds of Song. It was through the strength of his prayer that he was able to turn sadness and sighing into joy. Throughout his life King David was in great danger. “Unless God had been my help, my soul would almost have dwelt in silence” (Psalm 94:17). “For there is but a step between me and between death” (I Samuel 20:3). But David’s power was that he could transform everything from one extreme to the other. “The cords of death compassed me…I found trouble and sorrow. But I called on the name of God…You have delivered my soul from death, my eyes from tears and my feet from stumbling. I will go before God in the lands of the living” (Psalm 116:3-4; 8-9). Through the beauty of his songs he turned sorrow into joy. At all times he was able to cry out to God using every kind of prayer and entreaty, praise and song. In the end he became merged in eternal life: David, melech Yisrael, chai ve¬kayam. King David is alive!
Our task at present is to sift out the sparks of holiness from the depths of the husks and turn sadness and sorrow into joy. This is ¬how we join the returning voice with its root in the direct voice. But in time to come the task of sifting and selecting will be complete. Then God “will swallow up death forever, and the Lord God will wipe away the tears from all faces:’ (Isaiah 25:8). “And I will cause the spirit of uncleanness to pass away from the earth” (Zechariah 13:2). This will be the “day that is wholly Shabbat”, when all things will return to their supernal source-the Direct Voice, which is the source of all the joy and vitality of all the worlds.
In that time a new song will be sung, the song of Chesed, love. It will be the perfect expression of the Ten Kinds of Song. For all the songs and melodies of the present are merely a faint reflection of the Ten Kinds of Song, since song-is still rooted in the left side of Judgement. But in the future, when sadness and sighing will be banished forever and all will be transformed into perfect joy, then we will be worthy of hearing the song of the direct voice itself: “the ultimate joy and contentment, the joy of Your countenance” (Psalm 16:11). May it come speedily in our days. Amen.
(Likutey Halachot, Hilchot Perla u’Revia v’Ishut 3)
In a nutshell wasting seed is the most destructive sin. The lust for immorality is also the main source of evil temptation according to the Zohar. When one has sinned in this area, the kelipot or husks surround holiness and hide G-d from him. Being removed from G-d causes one to fall into depression and sadness. However the ten types of song have the ability to transform sorrow to happiness and thus free the holiness from impurity and the hold of the kelipot. This is an aspect of Chesed.
If you would like further info on the Tikkun and the English/Hebrew text and transliteration, you may purchase it here:
If you would like to download a hebrew only text, it is available here: https://www.breslov.org/bookshelf/tikun_adobe.pdf