Long-lived particles decaying to $e^pm mu^mp u$, with masses between 7 and $50$ GeV/c$^2$ and lifetimes between 2 and $50$ ps, are searched for by looking at displaced vertices containing electrons and muons of opposite charges. The search is performed using $5.4$ fb$^{-1}$ of $pp$ collisions collected with the LHCb detector at a centre-of-mass energy of $sqrt{s} = 13$ TeV. Three mechanisms of production of long-lived particles are considered: the direct pair production from quark interactions, the pair production from the decay of a Standard-Model-like Higgs boson with a mass of $125$ GeV/c$^2$, and the charged current production from an on-shell $W$ boson with an additional lepton. No evidence of these long-lived states is obtained and upper limits on the production cross-section times branching fraction are set on the different production modes.