There is a famous Bava Metzia 62a paskens that in a case where there are two people and there is only enough water for one to survive, the owner of the water drinks it and lets the other die:
ורבי יוחנן האי וחי אחיך עמך מאי עביד ליה מבעי ליה לכדתניא שנים שהיו מהלכין בדרך וביד אחד מהן קיתון של מים אם שותין שניהם מתים ואם שותה אחד מהן מגיע לישוב דרש בן פטורא מוטב שישתו שניהם וימותו ואל יראה אחד מהם במיתתו של חבירו עד שבא ר' עקיבא ולימד וחי אחיך עמך חייך קודמים לחיי חבירך
And Rabbi Yoḥanan, what does he do with this: “And your brother shall live with you”? He requires for that which is taught “two were walking on path and [there was] a jug of water in the possession of one of them. If both drink [both] die, but if one of them drinks, he will reach a settled area. Ben Petora taught: the preference is that both of them drink and die, and let neither one of them see the death of the other, until Rabbi Akiva came and taught “And your brother shall live with you,” (Vayikra 25:36) your life takes precedence over the life of the other.
The dispute in Nedarim 80b is even more surprising, which seems to bring the opinion of R' Yosei that if there is only enough water in a spring to wash your town's clothes or provide drinking water for another town, you are allowed to divert it to wash your clothes! However the following discussion seems to conclude that this is still an issue of life vs. life because dirty clothes are a pikuach nefesh in the long run.
I am currently trying to establish if there are exceptions to this. Based on the principle of Yoma 82b, "perhaps his blood is redder":
אמר לי מרי דוראי: קטליה לפלניא, ואי לא — קטילנא לך. אמר ליה: נקטלך ולא תקטול. מאי חזית דדמא דידך סומק טפי? דילמא דמא דההוא גברא סומק טפי
The master of the village said to me: Kill so-and-so, and if not I will kill you. [Rava] said to him: Let yourself be killed, and you should not kill. What did you see that your blood is redder? Perhaps the blood of that man is redder
It does seem more complicated than the original gemara. I believe there might be a Chazon Ish and/or an Iggerot Moshe on these halacot, does anyone know where they are?
I would like to know if there are any exceptions? Should one put the life of his wife and children first? Would it really be the case that if a husband and wife are in a desert and the husband has some water, he should drink it and... [can't type it, sorry]
I don't want to limit this question unnecessarily but it goes with my other question. I am trying to get to the bottom of whether we should love our fellow Jew more, less, or as much as Hashem, and what it practically means.