I attempt to derive the Hamiltonian of a charged particle in an electromagnetic field but I come up with an additional term. Could you help me check my process?
Using SI units, the Lorentz force on a particle with charge $e$ is $$ \mathbf{F} = e\mathbf{E} + e\mathbf{v\times B}. $$ We may write $\mathbf{E}$ and $\mathbf{B}$ as $$ \mathbf{E} = -\nabla\psi - \frac{\partial\mathbf{A}}{\partial t} $$ and $$ \mathbf{B} = \nabla\times\mathbf{A}. $$ In Einstein's tensor notation, these equations may be written as $$ F_i = eE_i + e\varepsilon_{ijk}v_jB_k, $$ $$ E_i = -\frac{\partial \psi}{\partial x_i} - \frac{\partial A_i}{\partial t} $$ and $$ B_i = \varepsilon_{ijk}\frac{\partial}{\partial x_j}A_k. $$ Thus, substituting these last equations on Lorentz's force law, $$ F_i = -e\frac{\partial \psi}{\partial x_i} - e\frac{\partial A_i}{\partial t} + e\varepsilon_{ijk}\varepsilon_{klm}v_j\frac{\partial}{\partial x_l}A_m. $$ I perform a permutation $\varepsilon_{ijk} = \varepsilon_{kij}$ and use the well-known relation between the Levi-Civita symbol and the Kronecker delta $$ \varepsilon_{ijk}\varepsilon_{imn} = \delta_{jm}\delta_{kn} - \delta_{jn}\delta_{km} $$ to obtain $$ F_i = e\left(-\frac{\partial\psi}{\partial x_i} - \frac{\partial A_i}{\partial t} + v_j\frac{\partial A_j}{\partial x_i} - v_j\frac{\partial A_i}{\partial x_j}\right). $$ I identify $$ \frac{dA_i}{dt} = \frac{\partial A_i}{\partial t} + v_j\frac{\partial A_i}{\partial x_j}, $$ and hence obtain $$ \frac{d}{dt}\left(p_i + eA_i\right) = e\left(-\frac{\partial\psi}{\partial x_i} + v_j\frac{\partial A_j}{\partial x_i}\right), $$ where $p_i$ is the $i$th component of momentum and I applied Newton's second law.
The additional term $v_j\partial A_j/\partial x_i$ is the one that seems out of place and stops me from writing this as an equation derivable from Hamilton's equations of motion. Should this term vanish for some reason?