Yes, you can certainly differentiate the Hamiltonian with respect to the momentum (or more generally with respect to anything in the Hamiltonian). For Dirac Hamiltonian (assuming $c=1$):
$$H=p_i \alpha^i + m \beta,$$
we simply have
$$v_i\equiv\partial_{p_i} H=\alpha^i,$$
which is the velocity (current) operator of the fermion. In quantum field theory, $v_i$ is also the vertex operator that couples the fermion to the electromagnetic field $A_i$ as $A_i \psi^\dagger v_i \psi$. In this sense, your question is indeed related to electromagnetism, or more precisely, quantum electrodynamics (QED).
In condensed matter systems, electrons usually have much more complicated Hamiltonians than the Dirac Hamiltonian. For example, the effective Hamiltonian for bilayer graphene reads
$$H=-\frac{1}{2m}\left(\begin{matrix}0&(p_1-ip_2)^2\\(p_1+ip_2)^2&0\end{matrix}\right).$$
In this case, the definition of $v_i\equiv\partial_{p_i}H$ becomes extremely useful in finding the correct vertex operator that couples the electron to the gauge field. It is not hard to find
$$v_1\equiv\partial_{p_1}H=-\frac{1}{m}\left(p_1\sigma^1+p_2\sigma^2\right),\quad v_2\equiv\partial_{p_2}H=-\frac{1}{m}\left(-p_2\sigma^1+p_1\sigma^2\right),$$
where $\sigma^1$, $\sigma^2$ are Pauli matrices. Then electromagnetic field will couple to the low-energy electron in the bilayer graphene via $A_i c^\dagger v_i c$. It is also meaningful to consider higher order derivatives of the Hamiltonian with respect to the momentum. For instance, the second order derivatives are defined as the inverse mass operators in solid state physics,
$$(M^{-1})_{ij}=\partial_{p_i}\partial_{p_j}H.$$
For the bilayer graphene, we can find $(M^{-1})_{11}=-(M^{-1})_{22}=-m^{-1}\sigma^1$ and $(M^{-1})_{12}=(M^{-1})_{21}=-m^{-1}\sigma^2$. The eigen values of the inverse mass operators actually determine the effective masses of the electron in the energy bands.