A builder aged 29 came to the accident and emergency department having jumped down on to a 15 cm nail. As the smallest movement of the nail was painful he was sedated with fentanyl and midazolam. The nail was then pulled out from below. When his boot was removed a miraculous cure appeared to have taken place. Despite entering proximal to the steel toecap the nail had penetrated between the toes: the foot was entirely uninjured.
We can assume with high probability that the pain was very real and that the man was not faking. He actually believed that a nail had been driven through his foot, and he believed that this should cause great pain, so he was in pain. But it was all in his head.
This does not mean that his pain was any less real, nor does it mean that he could have eliminated the pain by deciding not to be hurt. He was not in conscious control of the part of his brain that was generating the pain. Yes, it was a delusion, but he simply did not have the ability to disable that delusion.
A lot of pain and illness have mental rather than physical causes. But this does not mean that the people suffering are mentally or morally inferior in any way. Psychological illness is real illness, it needs to be treated seriously, and the people who suffer from it need to be treated with respect. But the fact remains that the only way to effect a long-term cure is to train their minds.
Mental therapy is like physical therapy. It takes time and intelligent guidance to work. A good physical therapist can help someone with severe physical problems recover mobility and live a normal life. Good mental training can do the same thing for mental illness. But telling someone who is in psychosomatic pain to 'grin and bear it' or telling someone with mental illness to 'just ignore the voices' is like telling someone with a dislocated shoulder to do a one-armed push-up. It simply cannot be done in the short term with sheer willpower. But with proper training and conditioning, you will eventually be able to work yourself up to it.