system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: Is there a real way to "fight for your life" or "don't give up" when you are deathly ill (coma, life support etc.)? I never understood this concept and wonder if it is science based or just us trying to will our sick loved ones to health. How would I do it if I were sick?
gpt
There are several glands in your brain and other organs that produce hormones.  Hormones are control chemicals; when the cells in your body encounter these hormones in your blood, they change their operation.  For example, adrenaline makes your heart beat faster and makes you more alert.

Bottom line, there's a direct influence from your "mood" (happy, sad, etc.) to several body functions (heart rate, blood flow to certain organs, appetite, etc.).  Someone who is happy all their life has better health (as measured by actual medical procedures) than someone who is sad or stressed out all their life.  The immune system is a component that responds quite strongly to various hormones.

So yes, there are medical effects if you keep a positive outlook.  Your immune system is stronger, and in general you have a better chance to overcome a disease.  It's not just a trick.