  We compute $P$-wave quarkonium wavefunctions at the origin in the
$\overline{\rm MS}$ scheme based on nonrelativistic effective field theories.
We include nonperturbative effects from the long-distance behaviors of the
potential, while the short-distance behaviors are determined from perturbative
QCD. We obtain $\overline{\rm MS}$-renormalized $P$-wave quarkonium
wavefunctions at the origin that have the correct scale dependences that are
expected from factorization formalisms, so that the dependences on the scheme
and scale cancel in physical quantities. This greatly reduces the theoretical
uncertainties associated with scheme and scale dependences in predictions of
decay and production rates. Based on the calculation of the $P$-wave
wavefunctions at the origin in this work, we make first-principles predictions
of electromagnetic decay rates and exclusive electromagnetic production rates
of $P$-wave charmonia and bottomonia, and compare them with measurements.
