© 2014 The Authors. We compute the spin-dependent and spin-independent structure functions of the forward virtual-photon Compton tensor of the proton at O(p3) using heavy baryon effective theory including the Delta particle. We compare with previous results when existing. Using these results we obtain the leading hadronic contributions, associated to the pion and Delta particles, to the Wilson coefficients of the lepton-proton four fermion operators in NRQED. The spin-independent coefficient yields a pure prediction for the two-photon exchange contribution to the muonic hydrogen Lamb shift, δETPE(π&δ)=34(13) μeV. We also compute the charge, 〈rn〉, and Zemach, 〈rn〉(2), moments for n≥3. Finally, we discuss the spin-dependent case, for which we compute the difference between the four-fermion Wilson coefficients relevant for hydrogen and muonic hydrogen.