A person has to try to do the maximum possible in the way of fixing himself and the world, which is all in the realm of the World of Action.
After that, he is released from all anxiety and sadness.
Because anxiety and sadness come from a certain lack of proportion, from the fact that a person thinks God is able to do wrong, or that it is up to me to set Him right.
Suffering by itself is not a matter of being mistreated by life; it is something given that has to be received, sometimes as a gift.
I have to relate realistically and not become sad or downhearted.
Pain and sadness are two very different qualities.
Sadness is a state of mind in which a person perceives himself as rather justified and decent, and God as rather unfair.
Thus, one should avoid falling into anxiety and sadness.
–Rabbi Adin Steinsaltz