A dispersion integral representation of the Heisenberg-Euler QED effective lagrangian is derived, with Faddeev's quantum dilogarithm as a generalized Borel kernel. The nonperturbative imaginary part of the effective lagrangian is expressed as the quantum dilogarithm, while the real part has the form of a dispersion integral involving both the quantum dilogarithm and its modular dual, a manifestation of electromagnetic duality. The Heisenberg-Euler effective lagrangian generates all one-loop QED scattering amplitudes in a constant external field, with the Lorentz invariants of the constant background electromagnetic field playing the role of the Mandelstam variables in conventional QED dispersion theory.