A search is performed for long-lived particles that decay into final states that include a pair of electrons or a pair of muons. The experimental signature is a distinctive topology consisting of a pair of charge dleptons originating from a displaced secondary vertex. Events corresponding to an integrated luminosity of $19.6\,(20.5)~\mathrm{fb}^{-1}$ in the electron (muon) channel were collected with the CMS detector at the CERN LHC in proton-proton collisions at $\sqrt{s} = 8~\mathrm{TeV}$. No significant excess is observed above standard model expectations. Upper limits on the product of the cross section and branching fraction of such a signal are presented as a function of the long-lived particle's mean proper decay length. The limits a...