  We present a generalization of the geometric phase to pure and thermal states
in $\mathcal{PT}$-symmetric quantum mechanics (PTQM) based on the approach of
the interferometric geometric phase (IGP). The formalism first introduces the
parallel-transport conditions of quantum states and reveals two geometric
phases, $\theta^1$ and $\theta^2$, for pure states in PTQM according to the
states under parallel-transport. Due to the non-Hermitian Hamiltonian in PTQM,
$\theta^1$ is complex and $\theta^2$ is its real part. The imaginary part of
$\theta^1$ plays an important role when we generalize the IGP to thermal states
in PTQM. The generalized IGP modifies the thermal distribution of a thermal
state, thereby introducing effective temperatures. At certain critical points,
the generalized IGP exhibits discrete jumps at finite temperatures, signaling a
geometric phase transition. We demonstrate the finite-temperature geometric
phase transition in PTQM by a two-level system and visualize its results.
