  Potential-based formulation with generalized Lorenz gauge can be used in the
quantization of electromagnetic fields in inhomogeneous media. However, one
often faces the redundancy of modes when finding eigenmodes from
potential-based formulation. In free space, this can be explained by the
connection to the well-known Helmholtz decomposition. In this work, we
generalize the Helmholtz decomposition to its generalized form, echoing the use
of generalized Lorenz gauge in inhomogeneous media. We formulate
electromagnetics eigenvalue problems using vector potential formulation which
is often used in numerical quantization. The properties of the differential
operators are mathematically analyzed. Orthogonality relations between the two
classes of modes are proved in both continuous and discrete space. Completeness
of two sets of modes and the orthogonality relations are numerically validated
in inhomogeneous anisotropic media. This work serves as a foundation for
numerical quantization of electromagnetic fields in inhomogeneous media with
potential-based formulation.
