Accumulating research suggests that the positive emotions (happiness, contentment, joy, etc.) are associated with healthy immune system functioning. Conversely, the negative emotions are associated with weaker immune function, greater production of stress hormones such as Cortisol, and greater incidence of illnesses. These findings suggest that how you habitually feel is much related to how vigorously you can resist illness.
To illustrate, consider that in one study depressed women suffering from breast cancer were found to have fewer immune system cells and weaker overall immune functioning when compared to non-depressed breast cancer sufferers. Because the immune system's job is, in part, to hunt down and kill cancer cells, depressed breast cancer sufferers weaker immune function means that their bodies are less likely to be able to resist their cancers. In the same vein, another study found that depressed bone marrow transplant patients were significantly more likely to die during the first post-treatment year than were non-depressed transplant recipients.
Positive emotions are not just window-dressing; they are intimately tied up with your immune function efficiency and your physical health. If you can learn to cope better with stress so as to avoid becoming depressed, and to lessen the time you spend feeling negative you can have a positive impact on your emotional and physical health.