Am I praying to dead people when I say this?
Read the paragraph again. It does not ask the dead to do anything. It says that I tie myself to the genuinely righteous people, those alive now and those resting in the dust, and especially to Rebbe Nachman. Then it asks that their merit protect us and all Israel. The psalms that follow are said to God.
The sources draw a careful line here. On a public fast day, the Gemara lists what the community does and asks the reason for each act. Why go out to the cemetery? Two Sages, Rabbi Levi bar Chama and Rabbi Chanina, disagree. One says it is to show we see ourselves as dead before God. The other says it is so that the dead will ask for mercy for us.
Later law is cautious. The Mishnah Berurah (a central commentary on daily Jewish law, from around 1900) says the cemetery is a good place to pray, but you should not aim your words at the dead. Ask God for mercy in the merit of the righteous resting in the dust. Those last words are the ones in our paragraph. Peninei Halakhah (a modern guide to Jewish law by Rabbi Eliezer Melamed) adds that some authorities allow asking the righteous to pray for us, and says to follow your family's custom.
Rebbe Nachman went further. He taught that a righteous person's death is like walking from one room into the next, and that if you call at the door, he hears you. That is his own teaching, and people differ on how far to take it.
Why bind yourself to anyone at all? In Likutei Moharan (Rebbe Nachman's main book of teachings) he says a clear mind comes only through attaching yourself to the righteous. His example: Moshe took Yosef's bones out of Egypt. Moshe stands for the mind, Yosef for the righteous person.
Tikkun HaKlali 1,Taanit 16a,Mishnah Berurah 581:27,Peninei Halakhah, Days of Awe 2:10,Sichot HaRan 156,Likutei Moharan I:211Can ten psalms really repair something? Isn't that magic?
Start with what the Rebbe says this is for. He calls it a repair in the area of personal holiness (in Hebrew, tikkun habrit), and he treats harm there as a serious spiritual matter. He does not say every case needs fixing. Some things happen without a person's choice, from being worn out or from how you slept. About those he says: this is nothing.
Only when a person brought it on himself, he says, is there real spiritual damage. For that he teaches the ten psalms, said on the same day. Going to a mikveh (a ritual pool) first is best. If you cannot, because you are sick or traveling, the psalms alone still help.
Is it a spell? He ties it to song. The ten psalms match the ten kinds of song in Tehillim, and in Likutei Moharan he says those kinds of song work against the damage because they are its opposite. He also gives deeper Kabbalah meanings, using letter-numbers and names of God, which this page does not go into.
He was also open about the limits. He said he would have liked to remove this problem completely, but that would mean changing human nature for everyone, forever, and that is not possible. The ten psalms are what he offers instead.
One thing to know: this is Rebbe Nachman's own teaching, not a ruling from the Gemara. He called it new.
Likutei Moharan I:205,Sichot HaRan 141:4-5, 141:14-18, 141:20-21,Likutei Moharan II:92Why ten psalms, and why these ten?
The number ten ties to the Gemara. Rabbi Yehoshua ben Levi taught that Tehillim was said in ten kinds of praise: nitzuach, niggun, maskil, mizmor, shir, ashrei, tehillah, tefillah, hoda'ah and halleluyah. Rebbe Nachman cites that passage and says ten psalms match ten kinds of song. His own list is a little different: it has berakhah (blessing) where the Gemara has tehillah.
At first he did not say which ten. Any ten would match. Later he chose these: Tehillim 16, 32, 41, 42, 59, 77, 90, 105, 137 and 150. They are said in the order they appear in Tehillim.
He also gave one verse for each kind of song. Four of those verses mention night: "even at night" (Tehillim 16:7), "at night His song is with me" (42:9), "I remember my song at night" (77:7) and "who gives songs in the night" (Iyov 35:10).
A small history note. In the first printing of Sipurei Maasiyot (Rebbe Nachman's stories), the printers made a mistake with Psalm 137, and the error spread into other books and prayerbooks. If your booklet has Psalm 137 as the ninth, it matches the Rebbe's list.
As for why these ten and not others, the Rebbe does not explain. Five of the verses he gave for the kinds of song do come from five of these psalms: 16, 32, 42, 59 and 77.
Pesachim 117a,Likutei Moharan II:92,Sichot HaRan 141:3, 141:26-28