EN
We investigate the compositional dependence of the total energy of the mixed crystals (Ga,Mn)As co-doped with As, Sn, and Zn. Using the ab initio linear muffin-tin orbital coherent potential approximation method we find a correlation between the incorporation of acceptors (Mn, Zn) and donors (Sn, antisite As). In particular, the formation energy of As_{Ga} is reduced by approximately 0.1 eV in the presence of Mn, and vice versa. This leads to the self-compensating behavior of (Ga,Mn)As.