Abstract: I expose nonrelativistic quantum electrodynamics in the Weyl-Wigner representation. Hence, I prove that an approximation to first order in Planck constant has a formal analogy with stochastic electrodynamics (SED), that is classical electrodynamics of charged particles immersed in a random radiation filling space. The analogy elucidates why SED agrees with quantum theory for particle Hamiltonians quadratic in coordinates and momenta, but fails otherwise.