Trans fats and saturated fats don't just increase "bad" LDL cholesterol levels they also increase your risk of developing depression, according to a new study.

Spanish researchers found that the more trans fats people ate, the more their risk of depression increased. People who ate the most trans fats had a 48 percent higher risk of depression than the people who didn't eat trans fats, according to the study.

Researchers also found that polyunsaturated fats, which are abundant in fish and oils such as vegetable and olive oil, were associated with a lower risk of depression.

Trans fats are found in industrially produced pastries and fast food , and are naturally present in some whole milk products, the researchers said.

Rates of depression have increased around the world over the past several years, the researchers said, and this study suggests depression is linked to what we eat.

"We have substituted certain types of beneficial fats polyunsaturated and monounsaturated in nuts, vegetable oils and fish for the saturated and trans fats found in meats, butter and other products," study researcher Almudena Sánchez-Villegas, associate professor of preventive medicine at the University of Las Palmas de Gran Canaria, said in a statement.

Researchers analyzed the diets, lifestyles and medical histories of 12,059 volunteers for six years. At the study's start, none of the volunteers had depression; at the end of the six-year period, 657 cases were identified.

The findings suggest that both depression and heart disease could be influenced in a similar way by diet, and could even share similar origins, researchers said.

Pass it on: Eating foods that contain trans fats may raise your risk of depression, but eating polyunsaturated fats may lower it.

Follow MyHealthNewsDaily on Twitter @MyHealth_MHND.