It's one of the body's crueler tricks: Chronic illness can be depressing, while depression makes chronic illness worse.

The human body is a study in staggering complexity, its more than 37 trillion cells all working together to create these walking, talking, thinking organisms. But for all the body’s amazing biologic mechanics, there are still a few unfortunate quirks that evolution has yet to iron out.

One that tops the list of quandaries is the relationship between pain and depression. Pain, and chronic pain in particular, is a complicated experience that is both an emotional state as well as a physical sensation. In certain ways, it resembles depression — in fact, the relationship between pain and depression is close. As the Harvard Medical School puts it, "Pain is depressing, and depression causes and intensifies pain. People with chronic pain have three times the average risk of developing psychiatric symptoms — usually mood or anxiety disorders — and depressed patients have three times the average risk of developing chronic pain."

It’s one of the places where the human body displays its dark side, an exceedingly tricky vicious cycle that many people are forced to contend with. The relationship often comes into play when people are suffering from chronic illness, which is consistently associated with an increase in depressive symptoms. In some cases depression associated with chronic illness stems from specific biologic effects of a disease — for instance with central nervous system disorders like Parkinson’s disease, or endocrine disorders like hypothyroidism. In other situations, depression is incited by the conditions and hardships brought on by illness.

Either way, depression worsens chronic illness and has been linked to higher rates of disease-related morbidity and mortality. Compared to patients without depression, those with depressive symptoms tend to experience diminished quality of life and have almost two times as many days of restricted activity or missed work, according to a study published in the Western Journal of Medicine.

The following are some of the illnesses most commonly associated with depression:

Up to 15 percent of people with cardiovascular disease and up to 20 percent of people who have had coronary artery bypass graft surgery experience major depression. And in fact, patients who have had coronary artery bypass graft surgery along with untreated depression have increased risk for morbidity and mortality.

Depression has become such a proven risk factor in heart disease and is so commonly missed by doctors that the American Heart Association now recommends that all cardiac patients be screened for depression.

Heart attack: 40 to 65 percent experience depression

Most of us understand that mental stress affects our heart health, but for patients who have suffered a heart attack, depression comes into significant play. In a landmark study, researchers found that depression after recovering from a heart attack increased the risk of death to 17 percent within six months after the event, compared to 3 percent in heart attack patients who didn’t have depression.

Parkinson's disease: 40 percent experience depression

While being diagnosed with a chronic illness may be cause alone for depression, in the case of Parkinson’s disease, there appears to be pathological causes as well. A 2008 brain imaging study found that people with Parkinson's disease may have an unusually high number of reuptake pumps for serotonin, the brain compound that helps regulate mood. Overactive pumps decrease serotonin levels, potentially leading to increased depression in some people with Parkinson's disease. Like many chronic illnesses, for people with depression and Parkinson's disease, both illnesses can make symptoms of the other worse, according to the National Institute of Mental Health.

Multiple sclerosis: 40 percent experience depression

Aside from the emotional stress of diagnosis, depression in patients with MS may be physically caused by the disease process itself. MS damages the myelin and nerve fibers deep within the brain — and if it affects areas that are involved in emotional processing, a number of behavioral changes can occur including the onset of depression, according to the National Multiple Sclerosis Society

Changes in the immune and/or neuroendocrine systems caused by MS can also affect depression; there is some evidence, for instance, that changes in mood in patients with MS are accompanied by changes in certain immune parameters. Also, some drugs such as corticosteroids or interferon medications — both prescribed for MS — may trigger or deepen depression.

Stroke: 10 to 27 percent experience depression

The National Institute of Neurological Disorders and Stroke describes post-stroke depression as, “a feeling of hopelessness that interferes with functioning and inhibits quality of life.” Left untreated, post-stroke depression can be dangerous in that it slows down recovery. Risk factors that can influence depression after stroke are both biological and behavior-influenced. Depression can stem from stroke damage to the brain as well as genetic influence, in addition to other factors like social isolation. Plus, stroke patients suffering from depressive symptoms may be less likely to follow treatment plans and may be more irritable or have changes in personality, according to research.

Cancer: 25 percent experience depression

That one in four people with cancer suffer from depression probably comes as a surprise to few. A diagnosis of cancer brings fear, anxiety and depression for an array of obvious reasons. A person with cancer, according to the American Cancer Society (ACS), might feel the loss of control over life events, and have to deal with changes in body image. “They might feel grief at the losses and changes in their lives that cancer brings,” notes the ACS. “They might fear death, suffering, pain, or all the unknown things that lie ahead.”

In addition, people suffering from pain, nausea and fatigue from treatment or from the disease itself are more likely to experience emotional distress, which compounds the problem when it makes the person less able to follow their cancer treatment plan.

Diabetes: 25 percent experience depression

The American Diabetes Association (ADA) warns of the problems that can happen when patients with diabetes have depression that is left untreated. The stress of managing diabetes on a day-to-day level is real, and can make people feel sad and isolated, they note. And depression and diabetes can easily spiral into a vicious cycle. “If you are depressed and have no energy, chances are you will find such tasks as regular blood sugar testing too much,” writes the ADA. “If you feel so anxious that you can't think straight, it will be hard to keep up with a good diet. You may not feel like eating at all. Of course, this will affect your blood sugar levels.” Which will affect your diabetes, which will affect your depression, which will … you get the picture.

And the link between the two may even be more intrinsic. Research shows that depression increases the risk for diabetes, and diabetes increases the risk for depression. One study found that women who were depressed were 17 percent more likely to develop diabetes, even after the scientists adjusted for other risk factors like weight and exercise.

More than 80 percent of people with depression show improvement with treatment, which is mainly comprised of psychotherapy, medicine or a combination of both. Additionally, if depression is related to chronic illness or the side effects of medicine, adjustments in illness treatment can make a difference. For people with chronic illness who get treatment for depression, often times their overall medical condition improves, as does that quality of life. In addition, they are better equipped to be diligent with their treatment plans.

Unfortunately, as the Western Journal of Medicine points out, depression can be overlooked by doctors when dealing with the bigger picture of a patient’s disease. “The presence of a chronic medical illness may reduce the likelihood that physicians or other health care providers recognize or treat depression. The demands of chronic illness management may crowd concerns of depression out of the visit agenda. Providers may also not look beyond a chronic medical illness to explain nonspecific symptoms, such as fatigue or poor concentration. Even when they recognize symptoms of depression, they may defer treatment, believing that “anyone would be depressed” in such a situation.

Which boils down to this: If you or someone you know is suffering from a chronic illness and might be suffering from symptoms of depression as well, the importance of seeking help can not be emphasized enough. Our bodies seem to love throwing curveballs, but help is available — and tackling the emotional components of an illness is paramount in stopping the downward spiral that depression and disease can so effectively inspire.