FREE CHOICE ABOUT YIR'AS SHAMAYIM
(R. Chanina): Everything that happens to a person is determined by Hash-m, except for whether or not he will fear Hash-m -- "Mah Hash-m Elokecha Sho'el me'Imach Ki Im l'Yirah."
Nidah 16b (R. Chanina bar Papa): At the time of conception, Hash-m decrees whether a person will grow to be strong or weak, wise or foolish, and rich or poor. He does not decree if he will be a Tzadik or Rasha, like R. Chanina taught.
Shabbos 156b: We learn from Rav Nachman bar Yitzchak that Mazal does not apply to Yisrael:
Astrologers had told his mother that he will be a thief. She told him to always cover his head so that fear of Shamayim will be upon him, and to request mercy (to be saved from the Yetzer ha'Ra). He did not understand why.
One day he was learning under a date tree; the covering on his head fell off. He looked up and saw the date tree. His Yetzer ha'Ra overpowered him, and he cut a cluster of dates with his teeth (the tree was not his. This was his 'natural' disposition, but his mother's advice enabled him to overcome it, except for this occasion.)
Mo'ed Katan 17a: Rav Yehudah excommunicated a Chacham of ill repute. Rav Yehudah died, and Rabanan did not permit the Niduy. The man cried. A bee stung him on his Ever, and he died.
They tried to bury him among Chasidim, but could not (a snake blocked the opening). They were able to bury him among judges. This is because he followed R. Ila'i's counsel:
(Beraisa - R. Ila'i): If a person feels his Yetzer ha'Ra overpowering him, he should go to a place where people don't recognize him, cover himself in black, and do as his heart desires. This way, he will not desecrate Hash-m's name.
Note: Kidushin 40a cites this teaching in the name of an Amora, R. Ila'i ha'Zaken, and questions it.
Kidushin 40a - Question (Beraisa): Anyone that is not concerned for the Creator's honor should not have come to the world.
(Rabah): This discusses one who gazes at a rainbow (it is a semblance of Kavod ha'Shechinah).
(Rav Yosef): This is one who sins in private.
Answer: Rav Yosef discusses one who could have overcome his inclination; R. Ila'i discusses one who was unable.
Sotah 14a: "Vela'Posh'im Yafgi'a" teaches that that Moshe prayed that Resha'im repent.
Avodah Zarah 5a (Beraisa): "Mi Yiten v'Hayah Levavam Zeh Lahem" - Moshe rebuked Yisrael 'You should have asked Hash-m to help you fear Him (but you did not want to feel indebted to Him)'.
Rif and Rosh (Mo'ed Katan 9a and 3:11): The Halachah does not follow R. Ila'i. Rather, even if one's Yetzer ha'Ra is overpowering him, he must settle his mind (and overcome it). We hold like R. Chanina, who says that everything is determined by Hash-m, except for Yir'as Shamayim.
R. Chananel (Mo'ed Katan 17a DH Mai): R. Ila'i discusses one who desires to drink amidst singing and Simchah, which is prone to lead to Aveiros. By going go to a place where he is unknown and wearing black he should overcome his desire. If he does not, he may drink like he desires. R. Ila'i does not permit doing an actual Aveirah! The Chacham followed R. Ila'i's counsel, but still drank amidst song.
Rav Hai Gaon (brought in Rashi Mo'ed Katan 17a DH Mah): R. Ila'i guarantees that by going go to a place where he is unknown and wearing black he will overcome his Yetzer.
Rebuttal (Tosfos Chagigah 16a DH v'Ya'aseh): The Gemara connotes that R. Ila'i counsel is to sin where he will not be seen (if not, what was the question)?
Tosfos (Mo'ed Katan 17a DH d'Avar): The Chacham transgressed R. Ila'i's counsel (he sinned in public), this is why he could not be buried among Chasidim. Some texts (e.g. ours) say that he following R. Ila'i's counsel, and therefore they were able to bury him among judges.
Nimukei Yosef (DH ha'Hu): The Chacham did not sin in public, only in private. Therefore, his death through the bee atoned for him. R. Ila'i did not condone sinning. Rather, perhaps exile and black clothing will subdue his Yetzer, and even if it does not he will avoid Chilul Hash-m.
Ritva (Rosh Hashanah 16b DH v'Yesh): We do not discuss doing an Aveirah, rather, matters of Reshus that are Chilul Hash-m if done by a great person, e.g. for Rav Nachman to take meat without paying immediately. If exile and black clothing do not subdue his Yetzer, he goes to where he is not known to avoid Chilul Hash-m
Rambam (Hilchos Teshuvah 5:1): Every person has the ability to be a Tzadik or a Rasha. Only man has this choice - "Hen ha'Adam Hayah k'Echad Mimenu".
Rambam (2,3): Fools say that Hash-m decrees if a person will be a Tzadik or Rasha. Everyone can choose to be a Tzadik like Moshe or a Rasha like Yarav'am. Likewise, He does not decree that one will be a Chacham or Sechel (foolish), merciful or cruel, stingy or generous, or any other Midah. No one forces a person, decrees on him or draws him to one side. He himself leans to the side of his choosing. Therefore it says "Mi'Pi Elyon "Lo Tetzei ha'Ra'os veha'Tov" and "Mi Yiten v'Hayah Levavam... l'Yir'ah Osi".
Rambam (4): If Hash-m would decree that a person be a Tzadik or Rasha, how could He command people through Nevi'im to be Tzadikim? It would be inappropriate to have Mitzvos, reward and punishment.
Question: It says "Kol Asher Chofetz Osah" - how can we reconcile this with man's ability to do as he chooses?
Answer (Rambam): It was Hash-m's will that people decide for themselves without compulsion.
Rambam (Shemoneh Perakim, Perek 8 DH Aval ha'Lashon): Getting married is either an Aveirah (if she is forbidden to him) or a Mitzvah (Peru u'Rvu, if she is permitted), therefore one cannot say that Hash-m decrees who will marry whom. Anything pertaining to human free choice in not b'Yedei Shamayim.
Rebuttal (Hagahos Ya'avetz 1): Hash-m can decide that if Ploni will choose to fulfill the Mitzvah, he will be rewarded with a proper Zivug. The Gemara says that Zivugim are announced before a person is born, and Zivug Sheni is according to a person's deeds.
Teshuvas ha'Ge'onim (Harkavy 390): Even though R. Chanina himself taught that Mazel applies even to Yisrael, and it makes a person wise or rich, Yir'as Shamayim is in a person's hands. The Mazel can cause that he will have a great struggle to overcome, but he will be rewarded commensurately. Rav Nachman bar Yitzchak illustrates how Mazel can cause great temptation to sin, but one can overcome it.
Note: The Gemara (Shabbos 156b) says that we learn from this that Ein Mazel l'Yisrael.
Tosfos (Megilah 25a DH ha'Kol): In Kesuvos (30a) it says everything is in Hash-m's hands except for except for colds and heatstroke. That refers to things that occur to man, but Yir'as Shamayim depends on the person. This is why one may not take credit for his Chachmah, wealth or might, only for his Yir'as Shamayim (Yirmeyahu 9:22).
Maharsha (Berachos 33b DH Milsa): Yir'ah Sichlis (intellectual) is b'Yedei Adam. Yir'ah Tiv'is (natural) is somewhat b'Yedei Shamayim. Punishments come to the world purely to instill fear in Yisrael and cause them to return in Teshuvah (Yevamos 63a).
Radak (Melachim 1:18:37 DH v'Atah): Some explain that Eliyahu complained "v'Atah Hasivosa Es Libam Acharonis", that Hash-m should have made Yisrael's hearts to be good. Do not rely on this. "Nosati Lefanecha Es ha'Chayim v'Es ha'Tov Es ha'Maves v'Es ha'Ra" - a person chooses which path he wants. The Rambam explains that due to their great sins Hash-m withheld Teshuvah from them so they will be punished, just like He hardened Paro's heart.
Poskim and Acharonim
Birkei Yosef (OC 46:7): We do not bless 'Who made me a Yisrael' because Yir'as Shamayim is not b'Yedei Shamayim. A father chooses to circumcise his son, and each person himself decides to observe the laws of Yisrael.
Maharsha (Avodah Zarah 5a DH Havah): Even though Yir'as Shamayim is not b'Yedei Shamayim, Hash-m can tilt people's hearts for the good.