@Victor Eremita,
This is a very important, and very difficult question.
A good friend of mine, a retired doctor, told me that in her entire life of doctoring, 80% of her patients actually needed a psychologist.
Most people that see psychologists, just need some TLC.
However, many medical doctors (and many psychologists) just do not have the sensitivity to decide when the pain is fabricated, or to what extent it is fabricated. Thats not a criticism, as I said, this is a very difficult question.
I have realised, that many aches of my own result indirectly from anxiety. When one feels anxious, one feels nauseous, and one often does not eat, or one eats food, like suger, which gives a high, and causes small aches. The situation feeds back on itself, the small aches lead to more anxiety on so on. Eventually the immune system is weakened (lack of proper nutrition) and something gives in, and this results in a medical ailment which can be diagnosed by the medical doctor.
The patient may be at the stage where they realise that something is wrong, and also remember that the last time they felt like this, they ended up getting sick.
So at what point does the psychosomatic symptom become a medical symptom?
As one can see there is a very fuzzy line between the two, very roughly speaking, as the immune system weakens. After this, the many many microbes in the local environment, or internal weaknesses can result in almost any ailment. Often a recurring problem, just happens to be the weakest organ in the body.
But the best ways to break the cycle, are : TLC prevents anxiety, remember to eat healthy food when feeling down, and an appetite stimulant can stimulate the person to eat when nausea is extreme.
But stopping yourself from feeling down, even when sick, is a psychological decision.
Many people become addicted to doctors and carers, instead of finding an internal motivation to lift their spirits.
Doctors must also be careful, that just because they cannot see the problem, they cannot conclude that it has to be psychosomatic. Even if they are probably correct 8 out of 10 times.
Patients must realise that anxiety feeds back into depression which can cause a loss of appetite which can lead to genuine physical illness.