Middle-aged workers counting the days until they can retire may not be eager to pursue a hobby, spend time with family or even take a long holiday -- they could be depressed.

Older men and women who show signs of depression tend to retire early, according to a new study.

We found a strong relationship between people in their late 50s who had depressive symptoms and who two years later were retired, said Professor Daniel Polsky of the University of Pennsylvania.

Feelings of loneliness, sadness, a lack of enjoyment of life and unhappiness are signs of depression.

Dr Jalpa Doshi, who headed the research team, said the results of the study are important for policymakers, employers and insurers.

In light of our findings, it is of concern that major depression and significant depressive symptoms are often unrecognized and under-treated, Doshi said in an email.

If people retire early as a result of depression, in addition to the financial hardship due to loss of income, it may potentially have far reaching detrimental effects on the health of late middle-aged workers who are unable to obtain health insurance.

The study, which is published in the Health Services Research journal, is based on data from the Health and Retirement study that covered 48 U.S. states. It tracked almost 3,000 adults between the ages of 53 to 58 every two years from 1994 to 2002.

If people had three out of eight symptoms they were considered depressed. Unlike men, women were likely to retire early even if they showed only mild symptoms of depression.

Depression affects your productivity in your job, Polsky said in an interview. It's harder to be motivated and it's harder to accomplish your tasks.

But treatments for depression are linked to having access to healthcare, which is often linked to a person's job.

Identifying and treating depression for people in the workforce may help maintain productivity, said Polsky.

We may be able to avert the decline in productivity that leads to early retirement.