כשם שציבור מתענים על צרתן, כך היחיד מתענה על צרתו. כיצד: הרי שהיה לו
חולה, או תועה במדבר, או אסור בבית האסורין--יש לו להתענות עליו, ולבקש
רחמים בתפילתו ואומר עננו, בכל תפילה שמתפלל
Just as the community fast when faced with a calamity, so too the individual should fast. Should a dependent be sick, lost in the desert or in prison, he should fast for him and ask for mercy in his prayer adding Aneinu to every Tefilah he prays.
There are a few striking elements in this Halacha. Maggid Mishna already notes that there is no source for an obligation to fast for a personal distress. Looking at the sources Gra and others suggest, they do not clearly say that it is an obligation. In fact one of the sources, the Gemara in Ta’aniyot 22b permits one to fast for a personal problem rather than commands one to do so, as if there may even be a possible prohibition to do so, which is in fact the opinion of rabbi Yossi. The other thing that is striking is that the obligation is only when it is for something that happened to someone close. [I translated לו dependent to emphasize this.] There is neither obligation nor even the mention of the viability of fasting for a stranger in this Halacha.
I believe that Rambam is consistent with his understanding that when a calamity befalls us, we need to look at ourselves and see what our contribution to this mishap was. It is a process of repentance and reformation. This process applies to the community as well as to the individual. It is however limited to our dependents who are under our influence thus suffering from our decisions. Our prayers and subsequent repentance will have no effect on strangers who are not affected by our deeds. Whatever befalls us is, in most cases, a result of decisions and actions that we made. In MN 3:12 Rambam discusses the evil things that befall us. Looking at all the bad things that happen to us, we can divide them and their causes into three distinct groups; those that occur naturally; those that occur as a result of people trying to subjugate others and finally the most common one by far, the ones we bring upon ourselves.
“The third class of evils comprises those which every one causes to himself by his own action. This is the largest class, and is far more numerous than the second class. It is especially of these evils that all men complain, only few men are found that do not sin against themselves by this kind of evil… This class of evils originates in man's vices, such as excessive desire for eating, drinking, and love; indulgence in these things in undue measure, or in improper manner, or partaking of bad food. This course brings diseases and afflictions upon body and soul alike.”
Rambam explains in MN3:36 –
“For the belief of the people that their troubles are mere accidents causes them to continue in their evil principles and their wrong actions, and prevents them from abandoning their evil ways.”Thou hast stricken them, but they have not grieved" (Jer. v. 3). For this reason, God commanded us to pray to Him, to entreat Him, and to cry before Him in time of trouble.”
Unlike the general view that prayer in such circumstances will somehow miraculously bring relief, Rambam sees taking responsibility and ownership for what happened as the only way that will prevent recurrences. It is only when we understand that our actions have consequences and we try to mend our ways that we can change our future. Prayer is not a miraculous cure but a first step in recognizing our role in what happened to us that lead to repentance and self-improvement.
So what is daily prayer? Why pray when nothing bad has occurred? More to come in upcoming post(s).
 He holds that by fasting one risks becoming sick and dependent on others.
 In Hil Evel 14:6 Rambam discusses the Mitzvah of Bikur Cholim – visiting the sick.
הנכנס לבקר את החולה--לא יישב לא על גבי מיטה, ולא על גבי ספסל, ולא על
גבי כיסא, ולא על גבי מקום גבוה, ולא למעלה ממראשותיו; אלא מתעטף, ויושב
למטה ממראשותיו, ומבקש עליו רחמים, ויוצא
Note that this prayer is only while visiting. Along the same approach as Meiri, it is a subtle reminder, by example, for the sick person to repent.