“I will thank You G-d, that You were angry at me.” (Isaiah 12; 1)
Why does the prophet use the future tense (I will thank you)?
Because when it comes to tragedies, we can’t understand why G-d does what He does. But in the future, when Moshiach comes, and when those who departed will become alive, and when there will be much joy and happiness, then we will understand, appreciate, and thank G-d.
Until then, we believe that G-d does everything for our ultimate benefit.
The Lubavitcher Rebbe explains, that Emunah (belief) is for what happened in the past, and Bitochon (trust) is for the future. So when something unfortunate happened, we believe that G-d did it for our ultimate benefit, even if we don’t understand how. But for the future, we trust that G-d will do things for us in a way that we see is good.
The Rebbe asks, how is it possible to contain these opposites? To regard past events one way, and to be optimistic for the future. The Rebbe notes that there is a similar contradiction regarding our actions. We need to invest effort to accomplish things, while at the same time, we believe that our accomplishments depend on G-d. (Queen Esther tried to save her people via diplomatic efforts, while simultaneously instructing the Jews to fast and pray to G-d.)
And he answers, we are able to contain opposites, because we have a G-dly soul. And just as G-d can contain opposites and do the impossible, so can we.
The Zohar states that there can be crying in one side of the heart, and joy in the other side.
Soldiers cry, and soldiers sing and dance and march to victory.
The Jewish people feel sad, and we unite to care for each other.
And when the complete Redemption comes wth Moshiach, then we will sing and dance forever.