Phosphorus-doped n-type diamond is currently one of the most promising wide-band-gap materials for next-generation high-power electronics and optoelectronics. Artificial diamond growth methods such as chemical vapor deposition involve hydrogen-containing precursors; therefore, the hydrogen atoms can be simultaneously introduced into the diamond lattice as a contamination and form complexes with other defects. In this work, we used the spin-polarized, hybrid density functional theory method to investigate the electronic structure, stability, and magnetic and optical properties of phosphorus, vacancy, and hydrogen clusters in diamond. Our results indicate a thermodynamic driving force for the formation of previously unidentified phosphorus-vacancy-hydrogen complexes that can be electrically, magnetically, or optically active centers. We found an unusual extremely large hyperfine coupling with the P-31 nuclei (A > 2 GHz) for some of the investigated defects that requires further experimental verification. Finally, we demonstrate that the PV2H0 complex has two metastable triplets between the ground- and excited-state singlets, and it may exhibit a highly selective spin decay channel to a ground state, which makes the defect a promising candidate for realizing long-living solid-state quantum memory. These results provide deep insight into the donor compensation effect associated with vacancy-related clusters, and they may be useful in future identification of P-related defects suitable for quantum information processing applications.