  The continuum Dirac model with an unbounded energy spectrum is widely used to
describe low-energy states in various electron systems, such as graphene,
topological insulators, and Weyl semimetals. However, if it is applied to
analyze the electromagnetic response of electrons to a vector potential, we
often find an unphysical result that breaks gauge invariance. This is an
artifact caused by an energy or wavenumber cutoff, which is used to avoid
divergence of the response. Here, we propose a modified energy cutoff procedure
that preserves the gauge invariance. We use this procedure to calculate the
response functions in a two-dimensional massless Dirac electron system. It is
shown that the resulting functions properly describe the electromagnetic
response in a gauge-invariant manner.
