What are a few (as many as possible) sources in the Gemara and cases in Tanach that deal with why one is not allowed to take his/her own life?
In Navi, Chazal, and Rishonim, we can several cases of suicide, two points should be investigated, firstly the source of the prohibition. Secondly the retrospective vue about the suicided man. In some cases to choice the death is right, sometimes it is wrong. Retrospectively sometimes we do not blame the suicider because of a supposed judgment distorsion, per example, influence of fear.
את דמכם לנפשותיכם להביא את החונק עצמו. יכול כשאול? ת"ל אך.
יכול כחנניה מישאל ועזריה? ת"ל אך.
your blood of your lives refers to who hangs himself.May be as Saul? The case of Saul is excluded by the word "only (אך)". May be as Chanania, Mishael and Azaria? Their case is excluded by the word "only (אך)".
 The two verses ((Genesis 9, 5-6: "וְאַךְ אֶת-דִּמְכֶם לְנַפְשֹׁתֵיכֶם אֶדְרֹשׁ, מִיַּד כָּל-חַיָּה אֶדְרְשֶׁנּוּ; וּמִיַּד הָאָדָם, מִיַּד אִישׁ אָחִיו--אֶדְרֹשׁ, אֶת-נֶפֶשׁ הָאָדָם. שֹׁפֵךְ דַּם הָאָדָם, בָּאָדָם דָּמוֹ יִשָּׁפֵךְ: כִּי בְּצֶלֶם אֱלֹהִים, עָשָׂה אֶת-הָאָדָם.") (And surely your blood of your lives will I require; at the hand of every beast will I require it, and at the hand of man; at th hand of every man’s brother will I require the life of man. Whoever sheds man’s blood, by man shall his blood be shed; for in the image of God he made man. ) ) are largely used in drashot on Gemara.
- in BK 91b as @mbloch taught us. We follow the Ramban on the verse:
- the literal translation is "דמכם נפשותיכם" (your blood witch is your life).
- The Gemara seems to translate "דמכם מנפשותיכם" (I would require the payement of your blood from yourself). We could discern a hint to suicide. In Sanhedrin 57b they learn that killing a foetus is the equivalent of killing a man for Bene Noach. A second rule derived from this is the authorization to kill the Rodef (Sanhedrin 72b)
- The second verse taught the prohibition of killing for Bene Noach.
 Man who committed suicide is at the same time murder and victimIn specific cases, Torah emphasizes that they hare victims before the act. As if the decision to kill them precedes the decision to suicide (see orchot Chayim Din Ahavat Hashem )
- In the "Kiddush Hashem spectrum". See S.A. Y.D. 157, Shach sk 1. . See also Bedek Habait here at the end of the page.
- The backward looking: We always try as much as possible to see the deceased as victim before the death (he was forced to make this, so he is a victim)
Evel Rabbati chapter 2
Mishna Gittin 6, 6
מִי שֶׁהָיָה מֻשְׁלָךְ לְבוֹר וְאָמַר, כָּל הַשּׁוֹמֵעַ אֶת קוֹלוֹ יִכְתֹּב גֵּט לְאִשְׁתּוֹ, הֲרֵי אֵלּוּ יִכְתְּבוּ וְיִתֵּנוּ. הַבָּרִיא שֶׁאָמַר, כִּתְבוּ גֵט לְאִשְׁתִּי, רָצָה לְשַׂחֶק בָּהּ. מַעֲשֶׂה בְּבָרִיא אֶחָד שֶׁאָמַר, כִּתְבוּ גֵט לְאִשְׁתִּי, וְעָלָה לְרֹאשׁ הַגַּג וְנָפַל וּמֵת. אָמַר רַבָּן שִׁמְעוֹן בֶּן גַּמְלִיאֵל, אָמְרוּ חֲכָמִים, אִם מֵעַצְמוֹ נָפַל, הֲרֵי זֶה גֵט. אִם הָרוּחַ דְּחָאַתּוּ, אֵינוֹ גֵט: One who was thrown in a pit, and said "That one who will hear would write Get to my wife". They need to write and to give. But an healthy man who says this is not serious. Once, an healthy man said "write Get to my wife!", he went up on the house top, fell and dead. Rabban Shim'on ben Gamliel said that the wises said If he fell intentionally the Get is regular. If the wind caused his fall., This is not a regular Get.
A surprising Gemara in Ketubot 103b
יומא דאשכבתיה דרבי נפקא בת קלא ואמרה כל דהוה באשכבתיה דרבי מזומן הוא לחיי העוה''ב ההוא כובס כל יומא הוה אתי קמיה ההוא יומא לא אתא כיון דשמע הכי סליק לאיגרא ונפל לארעא ומית יצתה בת קול ואמרה אף ההוא כובס מזומן הוא לחיי העולם הבא:
On the day that Rabbi died a bath kol went forth and announced: Whosoever has been present at the death of Rabbi is destined to enjoy the life of the world to come.
A certain fuller, who used to come to him every day, failed to call on that day; and, as soon as he heard this, went up upon a roof, fell down to the ground and died. A bath kol came forth and announced: That fuller also is destined to enjoy the life of the world to come.
 If the act is not an accident, as an inadvertently sliding, the view of the wises is that he was intended to give the Get.
Despite this, if he was very depressed, retrospectively he is considered as a victim. The "feeling of obligation" to suicide is not a loss of control but a feeling of lake of alternative choice.
 The fuller was not in the Kidush Hashem spectrum. But he was victim of his moral pain. The fact that he suffered so much was a proof that he was destined to enjoy the Olam Haba. His suicide is not "right" per se but is an indicator.
For details, see S.A. Y.D. 345 build on the basis of Evel Rabati. The Pitche Teshuva contains several Tshuvot that demonstrate the looking back on the deceased in Shut Chatam Sofer.
- Suicide is not allowed.It is a kind of homicide.
- Retrospectively the Poskim are not in hast to consider a person deceased by suicide as a 'culpable murder' because it is most likely that he has acted by unbeaverable pain, a kind of 'oiness'. We don't blame without serious reason.
- There are cases of suicide to avoid sin of Yehareg Veal Yaavor, the suicided is viewed as murdered and not as murder and may be regarded as killed for kiddush Hashem.
- Some poskim discussed the necessity to be stringent with suicided in way to avoid suicide. I asked several highly placed person in Chevra Kaddisha in Israel. The last opinion is not followed.
There is no direct prohibition of suicide in the Bible. The Gemara (Bava Kama 91b) derives its prohibition by exegesis on the verse: "and surely your blood of your lives will I require" (Genesis 9: 5), interpreted as: "I will require your blood if you yourselves shed it."
see also Bereishis Rabba 34:13
There are two famous cases of suicide in Tanach, Saul and Samson:
Saul’s suicide (I Samuel 31: 4-5) is not criticized by Chazal, and on the contrary, the Midrash (34:13) states explicitly that he did not sin, indicating that it was permitted for him to take his own life. Why is this so? The Yam Shel Shlomo suggests two possible reasons.
One is that Shaul was concerned that his falling into the hands of the enemy would have provoked the Jewish fighters into an impossible assault against the enemy camp, potentially costing thousands of lives. The Yam Shel Shlomo thus writes that it is permitted to give up one’s life for the purpose of saving other Jewish lives.
Another reason he suggests is that the falling of the anointed King of Israel into enemy hands constitutes a grave desecration of Hashem’s Name, and for this purpose it was permitted for Shaul to take his own life.
A third suggested explanation, which is from the Yefei To’ar (commentary to Midrash) and the Radak (Shmuel 31:4), is that the case of Shaul was special because he had been told by Shmuel that the enemy would not spare his life. Because of the certainty that he would die shortly, and given the special circumstances, it was permitted for him to take his own life.
Similarly, Shimshon’s suicide (Shoftim 16: 30), in which he brought down a building on himself and his Philistine tormentors, is defended on the grounds that it constituted an act of kiddush Hashem, “sanctification of the Divine Name,” in the face of heathen mockery of the G-d of Israel.