The physics of the pseudogap state is intimately linked with the pairing mechanism that gives rise to superfluidity in quantum gases and to superconductivity in high-Tc cuprates, and therefore, both in quantum gases and in superconductors, the pseudogap state and preformed pairs have been under intensive experimental scrutiny. Here, we develop a path integral treatment that provides a divergence-free description of the paired state in two-dimensional Fermi gases. Within this formalism, we derive the pseudogap temperature and the pair fluctuation spectral function, and compare these results with a recent experimental measurement of the pairing in the two-dimensional Fermi gas. The removal of the infrared divergence in the number equations is shown both numerically and analytically, through a study of the long-wavelength and low-energy limit of the pair fluctuation density. Besides the pseudogap temperature, the pair formation temperature and the critical temperature for superfluidity are also derived. The latter corresponds to the Berezinski–Kosterlitz–Thouless (BKT) temperature. The pseudogap temperature, which coincides with the pair formation temperature in the mean field, is found to be suppressed with respect to the pair formation temperature by fluctuations. This suppression is strongest for large binding energies of the pairs. Finally, we investigate how the pair formation temperature, the pseudogap temperature and the BKT temperature behave as a function of both binding energy and imbalance between the pairing partners in the Fermi gas. This allows us to set up phase diagrams for the two-dimensional Fermi gas, in which the superfluid phase, the phase-fluctuating quasicondensate and the normal state can be identified.