I have some problems understanding the transition from the Lagrangian to Hamiltonian formalism of electrodynamics. I will use the metric $(-+++)$.
I want to start from the Lagrangian which is invariant for parameterization for a free particle: $$ L=- m \sqrt{-\frac{dx^\mu}{d\lambda}\frac{dx_\mu}{d\lambda}}. $$ The conjugated momenta of $\dot x_\mu$ is
\begin{equation} (*) \hspace{1cm}p_\mu= \frac{\partial L}{\partial \dot x_\mu} = m \frac{\dot x_\mu}{\sqrt{-\dot x_\mu \dot x^\mu}}. \end{equation}
Performing Legendre transformation we get $$ H=\dot x_\mu p^\mu -L = 0. $$ So, fixing the gauge $x^\mu=( \tau , \vec x)$, we can write $$ p^\mu=\begin{cases} p^0= m\frac{1}{\sqrt{1- \dot x_i \dot x^i}}\\ p^i = m\frac{\dot x^i}{\sqrt{1-\dot x_i \dot x^i}} \end{cases} \Rightarrow \boxed{\dot x^i =\frac{p^i}{p_0}} $$ And using it in the definition of $p^\mu$ (*) we can rewrite and obtain
$$ p_\mu p^\mu + m^2=0 $$ Which is a primary constraint, and it appears in the Hamiltonian as
$$ H= \xi (p_\mu p^\mu + m^2). $$ Where $\xi$ is a Lagrange multiplier. To conciliate this equation with the motion equation via least principle action we find that the form of $\xi$ must leads to $$ H= \sqrt{p_\mu p^\mu + m^2}. $$
My problem now is that I can't perform the same arguments for the total Lagrangian of the electrodynamics. $$ L=- m \sqrt{-\frac{dx^\mu}{d\lambda}\frac{dx_\mu}{d\lambda}} - \frac{1}{4} F^{\mu \nu} F_{\mu \nu} - e \frac{dx^\mu}{d\lambda} \delta^{(4)}(x-x(\lambda))A_\mu(x(\lambda)). $$ I can't include the potential vector $A^\mu$ and I don't know how to treat the Lagrange multiplier for the Hamiltonian.