You wake up in the morning and are famished. In order to have strength to go to Shul you need to eat prior to Davening. However, if you were to Daven without a Minyan at home you would not have to eat prior to Davening. What should you do? Eat before Davening with a Minyan? Or Daven without a Minyan and avoid eating before Davening? (sources please)
Your question is addressed in a Biur Halacha O.C 89 "v'chen". A person who is eating for strength (because he experiences weakness) may eat before davening even if he could just as easily waited until after davening- since his intent is for his health.
However, he continues quoting, the best practice is to not eat before davening, even if this will disallow him from davening with a minyan because of his weakness.
I would qualify this with the assumption that davening first and eating later would not have an effect on his attention. If it does, perhaps we would defer to the Aruch haShulchan 89:25 quoting the Rambam that you must eat, and the Bais Yosef saying that it is optional (presumably because we don't have great attention anyway).
Hayom Yom (compiled by the Lubavitcher Rebbe from talks by his Father in Law, the previous Rebbe) says:
When my grandmother, Rebbetzin Rivka, was eighteen (in 5611, 1851) she fell ill and the physician ordered her to eat immediately upon awakening. She, however, did not wish to eat before davening; so she davened very early, then ate breakfast. When her father-in-law, the Tzemach Tzedek, learned of this he said to her: "A Jew must be healthy and strong. The Torah says about mitzvot, 'Live in them,' meaning bring vitality into the mitzvot. To be able to infuse mitzvot with vitality, one must be strong and joyful." Then he concluded: "You should not be without food. Better to eat for the sake of davening rather than to daven for the sake of eating;" he then blessed her with long life. [She was born in 5593 (1833) and passed away on Sh'vat 10, 5674 (1914)].
My father told this teaching of the Tzemach Tzedek to someone at yechidus, adding: "And this must be done with joy."
There is no issue (from either the point of view of the doctors and from the point of view of the Torah) to wake up early and daven then (maybe a loss of a bit of kavanah). Yet, the Tzemach Tzedek still told her to wake up on time and eat in the morning. Therefore, it is better to eat before davening and to daven properly than to not eat before davening and to daven improperly.
This article by Rabbi Yosef Melamed of Denver Kollel answers your question:
The Shulchan Aruch (Orach Chaim 89:54) rules that someone who is hungry or thirsty may eat or drink before davening.
The Mishna Berura qualifies this ruling as referring to one who is very hungry or very thirsty (Mishna Berura ibid.:25). The source of this halacha is the Rambam (Hilchos Tefila 5:2), who writes that in this case, one is obligated to eat or drink before davening in order to facilitate proper concentration for davening. However, the Shulchan Aruch only writes that someone who is hungry is allowed to eat, which implies that one is not obligated to do so (Magen Avraham ibid.:13). This is because nowadays there is a general lack of concentration when people daven, and it is assumed that one will not have the proper level of concentration even if he eats before davening. However, one still may choose to eat if his intention is to better his concentration (Magen Avraham ibid. based on Bais Yosef 89) .
The Pri Megadim (Orach Chaim 89 Eishel Avraham 13) explains that the reason for this heter (allowance) is that one is eating for the purpose of serving Hashem better, not to gratify his own desires, and so this eating is not regarded as haughtiness. According to this view, the prohibition does not apply at all.
According to the opinion of the Pri Megadim, one would be permitted to eat and daven later with the minyan. The eating is intended to enable davening with proper concentration and with a minyan, and, according to the Pri Megadim, this removes the issue of haughtiness altogether (Shu”t Mahari Shteif 41). One who wishes to follow the lenient opinion and eat before davening in order to concentrate properly while davening with a minyan should preferably recite the first chapter of Shema, as well as a minimum prayer containing a praise, request, and thanks to Hashem , as this fulfills the minimum obligation of prayer and thus suffices for the purpose of relying on this leniency (see Shu”t Mahari Shteif ibid., Shemiras Shabbos Kihilchasa 52:fn. 48).
wake up earlier so you don't feel so hungry, you may drink water, tea or coffee before shaharit and that's it. it like someone asking if it's better to eat nevelot or terefot, you shouldn't do neither.
even bediavad, if you suddently find yourself in this situation, just man up and go to the synagogue, you won't die, faint or get sick because you ate an hour later (even less if you compare the time difference between praying with the minian and alone)