It is well known that your psychological state influences the immune system a lot, and even from anecdata, you can see that people rapidly deteriorate when they give up. It is not a coincidence all these terms are used.
Can all cancers be beaten by sheer will? Of course not.
But it does play a huge factor in many cases.
citation needed. This meta study seems to not have found many biological links: https://www.ncbi.nlm.nih.gov/pmc/articles/PMC1361287/
Brief naturalistic stressors (such as exams) tended to suppress cellular immunity while preserving humoral immunity. Chronic stressors were associated with suppression of both cellular and humoral measures
The more a stressor deviated from those parameters by becoming more chronic, however, the more components of the immune system were affected in a potentially detrimental way.