I recently came across the concept of blessing G‑d over bad things that happen to a person just as one would do for good things that happen. What does this mean?
The concept you are referring to is based on a teaching of the Sages which states (Berachot 60a), “Just as one recites a blessing for his good fortune, so too must he recite a blessing for misfortune.”
The Talmud explains that this does not mean that he literally recites the same blessing in both instances, because they are not the same. The blessing for good occurrences is, “Blessed are You, G‑d, Who is good and does good”. The blessing in a case of misfortune, G‑d forbid, is “Blessed are You, G‑d, the true Judge”.
Rather, the implication is that one should accept misfortune with joy, like the joy with which he receives apparent and obvious good. The point is that we are to accept and integrate into our consciousness the truth that since G‑d is infinitely good, and everything comes from G‑d, everything must be for the ultimate good.
Consider a situation where a sick person, because of unhealthy habits, is forced to undergo invasive and tedious treatments in order to restore his health. While the treatments are immediately agonizing, since they are clearly for the person’s ultimate benefit, the painful treatments themselves are actually part of the good.
So too, we, because of poor spiritual habits, contract spiritual illnesses of which we might not even be aware. But G‑d, in His infinite kindness, diligently oversees our spiritual immune system and intervenes in order to help us return to and maintain spiritual health, balance and harmony.
Chassidic thought adds an extra dimension to the explanation of this teaching, which makes blessing over bad even more palatable.
Accordingly, the occurrences we perceive as good fortune come to us through the lower, revealed spiritual worlds. What we perceive as misfortune actually comes to us from the higher, concealed worlds. As above, since everything comes from G‑d, and for the good, what we perceive as misfortune is also good. It’s just that since it comes from such a high and concealed place, this goodness becomes concealed within this-worldly terms.
Furthermore, these spiritual worlds correspond to the letters of G‑d’s special, unique name. The lower worlds are manifestations of the latter letters of G‑d’s name, ‘vav’ and ‘hey’. The upper worlds are manifestations of the first letters of G‑d’s name, ‘yud’ and ‘hey’. When we joyfully accept and receive all that occurs in life, whether seemingly good or bad, as an expression of G‑dliness and the revelation of His will in the world, we unify the letters of His name ‘yud’ and ‘hey’ with ‘vav’ and ‘hey’ (with all that means and represents), thereby proclaiming and revealing His unity throughout all of Creation.