"Oneself" is pretty formal and a little archaic too. I don't think I've ever heard anyone actually say it in a normal conversation.
For example, you could say, "One has to learn to control oneself." I think the meaning is quite clear for you.
Alternatively,
"A boy (he) must learn to control himself."
"A girl (she) must learn to control herself."
"People (they) must learn to control themselves."
I hope this solves your question.