Om Swami
How can I control my mind when I am sad or upset?
Turn the mind away from sorrow
When the mind is unhappy, move the mind away from that feeling and know that it is a passing state. The ability to do this is self-restraint.
At that time just know that this is a passing state of the mind, this sorrow will go, but you must help your mind to rise above that sorrow.