In the last decades, the blossoming of experimental breakthroughs in the domain of electron energy loss spectroscopy (EELS) has triggered a variety of theoretical developments. Those have to deal with completely different situations, from atomically resolved phonon mapping to electron circular dichroism passing by surface plasmon mapping. All of them rely on very different physical approximations and have not yet been reconciled, despite early attempts to do so. As an effort in that direction, we report on the development of a scalar relativistic quantum electrodynamic (QED) approach of the inelastic scattering of fast electrons. This theory can be adapted to describe all modern EELS experiments, and under the relevant approximations, can be reduced to most of the last EELS theories. In that aim, we present in this paper the state of the art and the basics of scalar relativistic QED relevant to the electron inelastic scattering. We then give a clear relation between the two once antagonist descriptions of the EELS, the retarded dyadic Green function, usually applied to describe photonic excitations and the quasi-static mixed dynamic form factor (MDFF), more adapted to describe core electronic excitations of material. Using the photon propagator in a material, expressed in the relevant gauges, as a tool to understand the interaction between a fast electron and a material, we extend this relation to a newly defined quantity, the relativistic MDFF. The relation between the dyadic Green function and the relativistic MDFF does depend only on the photon propagator and not on the specifics of the particle (here, a fast electron) probing the target. Therefore, it can be adapted to any spectroscopy where a relation between the electromagnetic and electronic properties of a material is needed. We then use this theory to establish two important EELS-related equations. The first one relates the spatially resolved EELS to the imaginary part of the photon propagator and the incoming and outgoing electron beam wavefunction, synthesizing the most common theories developed for analyzing spatially resolved EELS experiments. The second one shows that the evolution of the electron beam density matrix is proportional to the mutual coherence tensor, proving that quite universally, the electromagnetic correlations in the target are imprinted in the coherence properties of the probing electron beam.