The researchers say it is important to consider both the pros and cons before women stop taking antidepressants during pregnancy.
The research, from University College London in the UK, is to be published in the Journal of Clinical Psychiatry.
Lead author Dr. Irene Petersen, whose research interests include prescribed medicine in pregnancy, says:
"Women often receive conflicting messages on whether they should continue taking antidepressants during pregnancy and many women may discontinue antidepressants in pregnancy because they fear adverse effects on their unborn child."
"However," she notes, "health care professionals should counsel women on other risks contributing to congenital heart anomalies in children such as age, weight, diabetes, alcohol problems and illicit drug use."
Dr. Petersen explains there is an ongoing debate about whether taking antidepressants in pregnancy can cause congenital heart anomalies in babies, but their research could find no evidence of this.
Instead, their analysis - which used data sampled between 1990 and 2011 from over 200,000 pairs of women and their children - finds that having diabetes, a body mass index of more than 30 and a history of alcohol and drug use does pose a higher risk of having a baby with congenital heart defects.
The team also found that these other factors were more likely to be found in women taking antidepressants.
Many previous studies have not taken other risk factors into account
The findings are important because some previous studies have pointed to a link between use of certain selective serotonin reuptake inhibitors (SSRIs) in pregnancy and congenital heart anomalies.
For example, a study published in The BMJ in July 2015 found a link between use of the SSRIs paroxetine and fluoxetine in early pregnancy and greater risk of birth defects. SSRIs are some of the most commonly prescribed antidepressants in pregnancy.
However, note the researchers behind the new study, many of these previous studies have not taken into account other risk factors that could affect children's health.
For their study, the team compared four groups of women; 5,154 took SSRIs before they got pregnant, 2,776 took them while they were pregnant, 992 took other antidepressants during pregnancy, and 200,213 did not take any antidepressants, either before or during pregnancy.
Their analysis showed that the risk of a baby being born with a heart defect was less than 1% across all four groups of women. However, it was higher among older women, and women who were obese, and much higher among women with diabetes or drug and alcohol problems.
When they looked more closely at the data, the team found that 35% of the women who took SSRIs were smokers, compared with only 20% of the women who did not take antidepressants.
Also, although the numbers involved were small, health records showing problems with use of alcohol and illicit drugs were 10 times more common among women who continued to take antidepressants while pregnant.
In previous work, Dr. Petersen says she and her team found that 80% of women stop taking antidepressants when they discover they are pregnant. There is also evidence from a US study that depression returns in 70% of pregnant women who stop taking antidepressants, which can also lead to major consequences, she notes, and urges:
"So it is important to consider both the pros and cons before women stop taking antidepressants during pregnancy."
Meanwhile, Medical News Today recently learned of other new research that finds depression in fathers increases risk of premature birth for babies, providing new insight into an area of research that is not well-studied - namely how fathers can affect the mother-baby pair and birth outcomes.