In USA, that depends on what state you reside. Laws vary from state to state.
Which loss of rights specifically are you concerned with. 2A rights?
Can't be removed without due legal process. In most states, you must be involuntarily admitted for X amount of time, and for X reason, before you lose your 2A rights. But Check your state laws on that. It's not Federal Law. I voluntarily admitted myself to a hospital ER under suicide watch, and, have not lost my 2A rights. As far as I know. Maybe I should try to purchase a new firearm, just to be sure? I might be on FBI shit list. Have I lost my right to vote? Not likely. Because I am not a convicted felon. However I did lose my Commercial driver right to transport Hazmat materials. But not bc I am cray cray. I've been Biploar forever, and that did not prevent me from transporting explosives and ammo to Army bases throughout the US. Hauled many a load. No, I lost my Hazamat endorsement bc I refused to pay TSA $150 to check if I might be a terrorist. I could not see any valid reason why I should pay for that shit out of My paycheck. Pay the Gov to prove I am Not a terrorist? The fuck I will. I switched to hauling lumber brick and steel instead of explosives. The pay was better too btw