When people are faced with a challenging situation and are in need of personal salvation, there is a custom to donate to charity and say, “I pledge this money in the merit of the soul of Rabbi Meir Baal Haness.” They then repeat three times:“Eloka D’Meir Aneini”
It is a custom in Klal Yisroel to light a Yartzelt candle on the day that a relative has passed away. The lighting of a candle, along with the giving of Tzedaka and learning Torah for the departed, enables the soul to be elevated to extreme heights, resulting in great benefit to the Neshama. Commemorating the deceased's memory in these ways brings tremendous merit for you and your family to be blessed with longevity, health, and success.
Rabbi Chaim Elazar Spira of Munkacs , offers another interesting explanation for why we mention Rabbi Meir in times of danger. With regard to various halachot, the presumption in the Talmud is that the majority of sick people continue to live and recover from their illnesses, while the majority of moribund people proceed to die.
However, Rabbi Meir is of the opinion that we don’t just look at the majority of incidents; rather, we also account for minority cases. Thus, according to Rabbi Meir, even if one is in a situation where he may be considered on his deathbed, we still would not consider him destined for death.