The isovector proton-neutron pairing in self-conjugate nuclei is treated in a formalism of quartets. Quartets are four-body correlated structures built from two neutrons and two protons coupled to total isospin T = 0. The ground state of the isovector pairing Hamiltonian is described as a product of quartets. We review both the case in which the quartets are constrained to be all identical and the case in which they are allowed to be distinct from one another. The quality of the two approaches is tested by making comparisons with exact shell model calculations for N = Z nuclei with valence nucleons outside the 16O, 40Ca, and 100 Sn cores. We consider both spherical and axially deformed mean fields. Both approaches are found to be very accurate. In the applications to a deformed mean field, in particular, the formalism with distinct quartets gives rise to results which are basically exact.