Analytical Theory of Energy Relaxation Upon Propagation of a High-Energy Electron Beam in Gas