The low-energy QED Hamiltonian that I would like to derive is ($c=\hbar=1$): $$ H = \frac{(p-eA)^2}{2m} = \frac{p^2}{2m} - \frac{e}{m} \vec{p}\cdot \vec{A} + \frac{e^2}{2m}A^2$$ where $A$ is the photon field operator. I can't get the third term. Here is what I did: Start with the Dirac Lagrangian and Legendre transform to get Hamiltonian: $$H = \int\!d^3x\,\psi^\dagger(x)\left[ \vec{\alpha}\cdot (-i\vec{\nabla}-e\vec{A}) - m\beta \right]\psi(x)$$ where $\alpha^i = \gamma^0 \gamma^i$ and $\beta = \gamma^0$. Now, in the Dirac, a.k.a standard representation of the Clifford algebra (as opposed to chiral representation which is better suited to high energy), we have $$H = \int\!d^3x\,\psi^\dagger(x)\left(\begin{array}{cc}-m &\vec{\sigma}\cdot (\vec{p}-e\vec{A})\\\vec{\sigma}\cdot (\vec{p}-e\vec{A}) & m\end{array}\right)\psi(x)$$ and $$\psi(x) = \sum_s\int\!\frac{d^3p}{(2\pi)^3}\,\sqrt{\frac{E+m}{2E}}\left(\begin{array}{c}\xi^s \\\frac{\vec{p}\cdot\vec{\sigma}}{E+m}\xi^s\end{array}\right)c_{ps}e^{i\vec{p}\cdot\vec{x}}\quad+\quad{\rm positrons}\;.$$ Now I want to consider the Hamiltonian only in the 1-electron Hilbert space, given by states with only one electron operator $c^\dagger_{ps}$ acting on the vacuum and any number of photon creation operators $a^\dagger_k$. If you plug this into the Hamiltonian, you get the $p^2/2m$ and the $p\cdot A$ terms with no problem. You also get a term that depends on spin $\xi^\dagger_{s'}\vec{\sigma}\xi_s$. But there is no sign of the $A^2$ term. What am I doing wrong?
Edit: The answer is obvious if you take a constant $A$. Maybe that's a hint as to how to get the answer in the general case?