Some but not all antidepressant drugs known as SSRIs pose a very small but serious heart risk, say researchers.
Citalopram and escitalopram, which fall into this drug group, can trigger a heart rhythm disturbance, a new study in the British Medical Journal shows.
UK and US regulators have already warned doctors to be extra careful about which patients they prescribe these medicines to.
And they have lowered the maximum recommended dose.
The UK's Medicines and Healthcare products Regulatory Agency (MHRA) says people with pre-existing heart conditions should have a heart trace before going on these drugs, to check for a rhythm disturbance known as long QT interval.
Experts reassure that complications are very rare and that in most cases the benefits for the patient taking the drug will outweigh the risks.
QT interval is measured with an electrocardiogram (ECG) and varies with the heart rate - it gets longer when the heart beats slower and is shorter when the heart beats faster.
Some variation is normal, but if it gets too long it can upset the timing of heartbeat with potentially dire consequences - dizziness, faints and, rarely, sudden death.
To assess how common a problem long QT linked to SSRI use might be, US researchers decided to look at the medical records of more than 38,00 patients from New England.
Most of these patients had been prescribed an SSRI antidepressant, and some were patients who had been prescribed methadone. The researchers included the methadone patients for comparison because this drug (used for pain relief and to wean addicts off heroin) is known to prolong QT interval.
All of the patients had recently had an ECG.
Both citalopram and escitalopram, as well as methadone, was linked with a small but significantly longer QT interval.
This effect increased at higher doses.
Risks vs benefits
But the researchers say that while longer QT interval is a risk factor for abnormal heart rhythms, these abnormal rhythms are still extremely rare, and the actual increase in QT observed was modest - so for the vast majority of patients, the potential benefits in treating depression or anxiety would far exceed the risk.
June Davison of the British Heart Foundation said: "Having a long QT interval can potentially increase the risk of a serious abnormal heart rhythm. However, as these abnormal rhythms are very rare, the potential benefits in treating depression would exceed the risk for most patients.
"People taking these drugs shouldn't be alarmed and shouldn't stop taking their medication without speaking to their doctor. If you've got any concerns, speak to your GP or pharmacist."
A spokesman for the MHRA said: "The potential risks associated are well known and restrictions have been placed on the level of dosage for particular groups of patients.
"This report acknowledges that the benefits of this medicine outweighs the risks but it is important that these factors are carefully considered by healthcare professionals for patients with pre-existing health conditions such as certain heart conditions."
Helen Williams, from the Royal Pharmaceutical Society, said: "Patients should be reassured that the effects on QT noted by the study researchers were small and the risk of any adverse outcome associated with these changes is very low.
"The study results may however assist clinicians distinguish between different antidepressants drugs when prescribing - choosing a lower risk agent for patients where there is an established increased risk of arrhythmias."