The first measurement of the e+e− pair production at midrapidity and low invariant mass in central Pb−Pb collisions at sNN=5.02 TeV at the LHC is presented. The yield of e+e− pairs is compared with a cocktail of expected hadronic decay contributions in the invariant mass (mee) and pair transverse momentum (pT,ee) ranges m_{\rm ee} < 3.5 GeV/c2 and p_{\rm T,ee} < 8 GeV/c. For 0.18 < m_{\rm ee} < 0.5 GeV/c2 the ratio of data to the cocktail of hadronic contributions without ρ mesons amounts to 1.42±0.12(stat.)±0.17(syst.)±0.12(cocktail) and 1.44±0.12(stat.)±0.17(syst.)−0.21+0.17(cocktail), including or not including medium effects in the estimation of the heavy-flavor background, respectively. It is consistent with predictions from two different models for an additional contribution of thermal e+e− pairs from the hadronic and partonic phases. In the intermediate-mass range (1.2 < m_{\rm ee} < 2.6 GeV/c2), the pair transverse impact parameter of the e+e− pairs (DCAee) is used for the first time in Pb−Pb collisions to separate displaced dielectrons from heavy-flavor hadron decays from a possible (thermal) contribution produced at the interaction point. The data are consistent with a suppression of e+e− pairs from cc and an additional prompt component. Finally, the first direct-photon measurement in the 10% most central Pb−Pb collisions at sNN=5.02 TeV is reported via the study of virtual direct photons in the transverse momentum range 1 < p_{\rm T} < 5 GeV/c. A model including prompt photons, as well as photons from the pre-equilibrium and fluid-dynamic phases, can reproduce the result, while being at the upper edge of the data uncertainties