Medics currently have to rely on trial and error, meaning around half of the time the first type of antidepressant given fails to work.
The researchers from King’s College London say checking a patient’s blood could help identify accurate treatment.
Those who test positive for inflammation need more aggressive therapy from the outset, they say.
So far the researchers have tried out their blood test on a small number of volunteers – 140 people with depression.
They say they will need to do a large trial to check how well it might work in the real world.
The blood test, described in the International Journal of Neuropsychopharmacology, is the culmination of years of investigation.
It looks for two specific markers of inflammation – a compound called macrophage migration inhibitory factor (MIF) and another called interleukin-1beta.
In the study, patients with high levels of these markers were unlikely to respond to conventional, commonly prescribed SSRI and tricyclic antidepressants.
Lead researcher Prof Carmine Pariante said this knowledge could help tailor treatment to the individual.