  We present a generator-coordinate method for realistic shell-model
Hamiltonians that closely approximates the full shell model calculations of the
matrix elements for the neutrinoless double-$\beta$ decay of $^{124}$Sn,
$^{130}$Te, and $^{136}$Xe. We treat not only quadrupole deformations but also
the proton-neutron pairing amplitudes as generator coordinates. We validate
this method by calculating and comparing spectroscopic quantities with the
exact shell model results and experimental data. Our Hamiltonian-based
generator-coordinate method produces $0\nu\beta\beta$ matrix elements much
closer to the shell model ones, compared to the existing
energy-density-functional-based generator-coordinate approaches. The remaining
overestimation of $0\nu\beta\beta$ nuclear matrix element suggests that
additional correlations may be needed to be taken into account for $^{124}$Sn,
$^{130}$Te, and $^{136}$Xe when calculating with the Hamiltonian-based
generator-coordinate method. The validation of this method may open the
possibility of calculating $0\nu\beta\beta$ matrix element of $^{150}$Nd in a
large shell-model space.

Nuclear Theory