We solve the Dirac equation describing the behavior of a hydrogen-like atom interacting with a spatially inhomogeneous ultrashort electromagnetic field pulse in the sudden-perturbation approximation. We express the corresponding transition probabilities through the known inelastic atomic form factors widely used in the theory of relativistic collisions of charged particles with atoms.