What's the name of the effect that makes someone think he is sick, but in fact, the illness is psychological?
An illness that is "all in a person's mind is called psychosomatic. If you take a look at the word you can see exactly what it means:
PSYCHO: of the mind
SEMANTIC: to indicate by a sign (symptom)
So, if you put them together, you have a symptom that is generated by the mind.
Here is another possible answer to your question:
A Hypochondriac is someone who suffers from Hypochondriasis. These are people who have an excessive amount of worry about being sick or getting sick when they really are not. Sometimes it becomes a self-fulfilling prophesy. The patient thinks he/she is sick and so they worry a lot. The worry leads to stress, fatigue, stomach problems, etc. Then, the patient has actual symptoms to worry about and really does feel sick.
Hypochondriacs are often preoccupied by "little things" that most people would not notice or would just chalk up to aches and pains. They often do not believe when doctors tell them there is nothing wrong and can be victims of medical "quacks" who promise expensive "miracle cures."
It is important remember that Hypochondriasis is a psychological condition. It is not enough to tell people to "snap out of it" or to think that a nice logical talk with cure them of it. Hypochondriasis is often combine with other disorders, like OCD, that make it difficult to treat.
Psychosomatic or psychophysiologic illness is the term of sickness caused by mental disturbances rather than physiological problems.
The word for that is "psychosomatic."