From all of this, we see that when one recognizes that everything that occurs to him is from Hashem and is for his benefit, he will receive an abundance of goodness and bracha, and his suffering will cease to exist. If one thanks Hashem and praises Him for whatever occurs, he is, in fact, causing himself to receive an abundance of goodness.
When we daven to Hashem and express our thanks to Him, we are opening the gates to receive His kindness. The Baal Haturim (Parshas Va’eschonon) sees a hint to this concept from the pasuk: “Va’eschonon el Hashem ba’eis hahi.” (And he davened to Hashem at that time.) The word “va’eschonon” has the same gematriah as the word “shira”. This indicates that Moshe sang shira to Hashem and praised Him so that his tefillos should be accepted.
