Bhagavad Gita Chapter 05, Text 23

Bg 5.23

saknotihaiva yah sodhum
prak sarira-vimoksanat
kama-krodhodbhavam vegam
sa yuktah sa sukhi narah

Word for word: 
saknoti — is able; iha eva — in the present body; yah — one who; sodhum — to tolerate; prak — before; sarira — the body; vimoksanat — giving up; kama — desire; krodha — and anger; udbhavam — generated from; vegam — urges; sah — he; yuktah — in trance; sah — he; sukhi — happy; narah — human being.

Translation by His Divine Grace A. C. Bhaktivedanta Swami Srila Prabhupada:
Before giving up this present body, if one is able to tolerate the urges of the material senses and check the force of desire and anger, he is well situated and is happy in this world.

Purport by His Divine Grace A. C. Bhaktivedanta Swami Srila Prabhupada:
If one wants to make steady progress on the path of self-realization, he must try to control the forces of the material senses. There are the forces of talk, forces of anger, forces of mind, forces of the stomach, forces of the genitals, and forces of the tongue. One who is able to control the forces of all these different senses, and the mind, is called gosvami, or svami. Such gosvamis live strictly controlled lives and forgo altogether the forces of the senses. Material desires, when unsatiated, generate anger, and thus the mind, eyes and chest become agitated. Therefore, one must practice to control them before one gives up this material body. One who can do this is understood to be self-realized and is thus happy in the state of self-realization. It is the duty of the transcendentalist to try strenuously to control desire and anger.