I never know what to say to someone who is sick. What is a visit for?
Start with the psalm's own word for the visitor. Radak explains that a maskil is someone who comes to see the sick person, asks about his condition, helps however he can, and speaks to his heart. That is a list of things to do. It is not a speech.
The Gemara tells a story. A student of Rabbi Akiva (one of the greatest sages of the Mishnah) got sick, and none of the sages came to see him. Rabbi Akiva came, and the floor was swept and sprinkled with water for him. The student recovered and said, "Rabbi, you gave me life." Rabbi Akiva went out and taught that anyone who does not visit the sick is like someone who spills blood. Rambam (Maimonides, the great medieval legal scholar) repeats this in his law code and says a visitor is like someone who takes a share of the illness and makes it lighter.
How can a visit help the body? Rav Dimi says a visitor "causes him to live," and the Gemara asks how. The answer is prayer: someone who stays away does not pray for him at all. On the first day Rava was sick, he told his family to tell no one. After that, he told them to announce it in the marketplace, so that those who loved him would pray for him.
Rabbi Yochanan once visited his sick student, Rabbi Chiya bar Abba, said "Give me your hand," and stood him up. Later Rabbi Yochanan got sick, and Rabbi Chanina did the same for him. Why could Rabbi Yochanan not raise himself? The Gemara answers: a prisoner cannot free himself from jail.
The sources also describe the wrong kind of visit. Radak's father gave the example of a visitor who says, "Your illness is hard on me, because my father died of this one." The picture they give is simple: come, see what is actually needed, help with it, and say something that gives strength instead of fear.
Radak on Tehillim 41:2 and 41:7,Nedarim 40a,Mishneh Torah, Laws of Mourning 14:4,Berakhot 5bVerse 5 says "I have sinned against You." Does being sick mean you did something wrong?
In verse 5 the sick person says, "Hashem, be gracious to me, heal my soul, for I have sinned against You." It is easy to hear a rule in that: sickness is punishment. The sources do not agree that it is.
Radak does read it that way for this man. He notes that he did not ask God to heal his body. He asked God to heal his soul, because the cause of his illness is his sins. If God forgives the soul, the body is healed. The Gemara has a similar line. Rabbi Alexandri, in the name of Rabbi Chiya bar Abba, says a sick person does not get up from his illness until all his sins are forgiven.
Ibn Ezra reads the same words differently. For him the sick man is saying: be gracious to me and heal me even though I have sinned against You. He compares it to the phrase "for it is a stiff-necked people." On this reading, the man asks for mercy in spite of his sins.
The Gemara also gives advice to the one who is suffering. Rava (some say Rav Chisda) says that a person who sees suffering come upon him should examine his own deeds. If he finds nothing, he can blame neglect of Torah study. If he finds nothing there either, he can know these are "afflictions of love," hardship that comes from love, since "the one Hashem loves He corrects."
The Gemara is just as clear about everyone else. If illness or suffering comes upon a person, you may not speak to him the way the friends of Iyov (Job) did: "Remember, who ever perished while innocent?" At the end of the book of Iyov, God tells Eliphaz, the friend who said that, that He is angry at him and his two friends, "for you have not spoken to Me correctly, as My servant Iyov has."
So the question stays partly open. A sick person may look at his own life, as the man in the psalm does. Someone else may not say it to him.
Radak and Ibn Ezra on Tehillim 41:5,Nedarim 41a,Berakhot 5a,Bava Metzia 58b,Iyov 4:7 and 42:7Verse 11 says "let me repay them." Does the psalm want revenge?
Before verse 11, the psalm lists what was done to the sick man. His enemies ask, "When will he die and his name be lost?" A visitor comes and then whispers outside. A friend who ate his bread turns on him. Radak says this is how it goes: when a person falls, even those he thought were friends become enemies. He quotes Mishlei: "All the brothers of a poor person hate him."
Then comes: "Hashem, be gracious to me and raise me up, and I will repay them." That sounds like revenge. Radak says it is not. He points out that the verse does not say David will do them harm. In his first explanation, the repayment is smaller: when they are sick, he will not put on sackcloth, pray for them, or feel their pain.
Radak then quotes a teacher he calls "the Gaon," named in the printed edition as Rav Saadia Gaon (Gaon was the title of the heads of the Babylonian academies). The Gaon read it as the opposite: I will repay them good in place of bad. He points to David's words elsewhere: "And I, when they were ill, my clothing was sackcloth." Sackcloth is rough cloth worn to show grief.
Midrash Tehillim puts it as a question and answer: "What will you repay them, evil?" "God forbid." Then it quotes that same verse about wearing sackcloth when they were sick.
The two readings differ on what David owes them. One says he owes them no harm. The other says he gives them kindness. Neither reading has him hurting anyone.
Radak on Tehillim 41:10-11,Tehillim 35:13,Midrash Tehillim 41:4,Mishlei 19:7