In summary: So, the rest-energy of a photon is just its energy:$$E_{\gamma}=c \sqrt{m_{\gamma}}.$$So the total rest-energy of a system after pair annihilation is just the sum of the rest-energies of the particles before the annihilation.
Acoording to the internet, majorana fermions are particles which its antiparticle is itself. But shouldn't particles and antiparticles annihilate each other? Then how could such particle exist or being predicted?
The photon is also its own antiparticle, yet it doesn't prevent its existence. One photon or one majorana fermion will not annihilate with itself. The annihilation requires two photons or two majorana fermions put sufficiently close to each other, which is not so easy to achieve.
Well, you can (in principle) annihilate two photons by, e.g., the QED process ##\gamma+\gamma \rightarrow \mathrm{e}^+ + \mathrm{e}^-##, which is the time-reversed process of usual electron-positron pair annihilation. I'm not sure, whether this is observed already with free photons. Of course, it's easy to observe it with a "virtual photon", i.e., scattering of a photon at a heavy nucleus in the reaction ##\gamma + A =A + \mathrm{e}^+ + \mathrm{e}^-##. That's usually done in the introductory physics lab.
Do you mean electron capture? Potassium-40 indeed decays both by the usual ##\beta## decay, i.e., ##\mathrm{K} \rightarrow \mathrm{Ca}+\mathrm{e}^- + \bar{\nu}_{\mathrm{e}}## or by electron capture ##\mathrm{K} + \mathrm{e}^- \rightarrow \mathrm{Ar} + \nu_{\text{e}}##. This is, however a process due to the weak interaction. It has nothing to do with pair annihilation or the inverse process (two photons to an electron-positron pair) discussed above.
Do pair annihilations completely convert a type of particle into another type?
For example, if electron-positron pairs annihilate each other, are their masses completely turned into photons or something will be lost during the process?
All reactions strictly obey energy-momentum conservation. The usual pair annihilation example is indeed ##\mathrm{e}^+ + \mathrm{e}^- \rightarrow \gamma+\gamma##. In this process all relevant conservation laws (energy, momentum, angular momentum, and electric charge) are of course fulfilled exactly.
In relativistic physics we understand the energy to contain always also the rest-energy due to its mass. A particle of mass ##m## with three-momentum ##\vec{p}## has an energy ##E## given by the relativistic energy-momentum relation
$$E=c \sqrt{m^2 c^2+\vec{p}^2}.$$
For a photon this holds true too, but a photon is (as far as we know) massless, i.e., then we have ##m_{\gamma}=0##.