Binding energy for electrons

When protons and neutrons interact attractively and coalesce to form an atomic nucleus, their energy in this state must be less than what it was when they are separated, so they lose mass which is then converted into energy by $$E=mc^2$$. Now, when electrons interact attractively with an atomic nucleus and orbit it under act of electrostatic forces, their energy in this state must be also less than what it was when they were free. So what this energy difference between the two electron states could come from? They will lose mass also?

And if they lose mass, how they could when they are, unlike protons and neutrons, are not composed from intraparticles, so they cannot convert their intraparticles total potential energy into binding energy.

So, let's look at your example. If we consider a system that consists of a proton and an electron very far from each other, the energy of their interaction is basically zero. This system has a mass of $$m_p+m_e$$. Now, if we have a system where the electron and proton form a hydrogen atom's ground state, the energy of that interaction is $$-13.6$$ eV. This negative interaction energy is part of the system's total mass, which is $$m_p+m_e-(13.6\text{ eV})$$. Neither the proton nor the electron lose mass. There's simply another thing that's part of the system's total mass.