  We calculate the Wigner function for massive spin-1/2 particles in an
inhomogeneous electromagnetic field to leading order in the Planck constant
$\hbar$. Going beyond leading order in $\hbar$ we then derive a generalized
Boltzmann equation in which the force exerted by an inhomogeneous
electromagnetic field on the particle dipole moment arises naturally.
Furthermore, a kinetic equation for this dipole moment is derived. Carefully
taking the massless limit we find agreement with previous results. The case of
global equilibrium with rotation is also studied. Our framework can be used to
study polarization effects induced by vorticity and magnetic field in
relativistic heavy-ion collisions.
