This is from R' Chaim Friedlander's Sifsei Chaim al haMo'adim (vol. 1), in his discourse on R' Elazar ben Durdaya's epiphany (Avoda Zara 17a), "The matter depends only on me" ("אין הדבר תלוי אלא בי"):
שמעתי בשם אדם גדול שלמד ממעשה של ר"א בן דורדיא הערה נפלאה, והוא יסוד גדול בכוחות הנפש של האדם: טבעו של האדם, כשאינו שבע רצון ממצבו הרוחני נוהג הוא להשקיט את מצפונו ולתלות את הדבר בסיבות שונות. "אילו היה לי חבר טוב, חברותא טובה, שכן טוב וכו' הייתי לומד טוב יותר", ובאמת אין אלו אלא "תירוצים". מצב זה מסוכן הוא עד מאוד – כיון שבכך נאבדת כל הדחיפה לשינוי עצמי, שהרי לדעתו מצבו הרוחני תלוי בסיבות שאינן בשליטתו. אין בכך אלא אשליה עצמית שישועתו תצמח ממקום אחר, והרי זה מדרכי היצר להרגיע את האדם בסברו שאין הדבר תלוי בו, והוא עצמו אינו יכול לפעול מאומה בנידון. אכן, הישועה האמיתית של האדם היא כאשר מגיע להכרה "שאין הדבר תלוי אלא בי", אז ייווכח שכל התירוצים תירוצי שוא הם, ולפני הקב"ה לא יוכל לטעון כל זה.
I heard in the name of a great scholar that he learned a wonderful insight from the story of R' Elazar ben Durdaya, and it is a fundamental concept regarding a person's spiritual capabilities:
A person's nature, when he is not satisfied with his spiritual condition, drives him to quell his conscience and to attribute the matter to various circumstances: "If only I had a good friend, a good chavrusa, a good neighbor, etc., I would study better." In reality, these are only rationalizations.
This situation is extremely dangerous, because this is how all self-motivation is lost, since, in his opinion, his spiritual condition is dependent on factors that are outside of his control. This is nothing but the self-delusion that his salvation will sprout from some other place. This is the way of the Evil Inclination, to reassure the person with the reasoning that the matter does not depend on himself, and that he himself cannot do anything about it.
Indeed, the true salvation of a person is when he arrives at the realization "that the matter depends only on me." Then, it will be clear that all of the rationalizations were false, and that he will not be able to claim all this before the Holy One Blessed be He.
A person should not say, "If only I had..." These types of thoughts only paralyze a person and disturb his growth.... It is said about Reb Naftali Amsterdam zt"l that he said to his rebbe, the Gaon Reb Yisrael Salanter zt"l: "If only I had the head of the Sha'agas Aryeh, the heart of the author of Y'sod v'Shoresh haAvoda, and the good character traits of our rebbe (i.e. R' Salanter), then I would be able to serve HaShem Yisbarach." Reb Yisrael Salanter answered him: "Naftali! You, with your head, with your heart, with your character, you should be Rabbi Naftali. Then you will be able to truly serve HaShem."...
We learn in Avos (1:14): "Hillel says: 'If I am not for myself, who will be for me? And if I am for myself, what am I? And if not now, when?'" The explanation of the matter follows the Sha'arei T'shuva (2:26):
"If a person doesn't arouse his soul, how will admonitions help him? For even if they enter his heart on the day that he hears them, his Evil Inclination will make him forget them and cause them to pass from his heart.... Therefore, a person must arouse his soul when he hears the mussar, take the words to heart, contemplate them constantly, add new insights on top of them, and draw things from his own heart. And he should introspect in the chambers of his spirit. And he should go back and take the rebuke upon himself and not only rely on the rebuke of the censurer... until his soul fully accepts the mussar and he is purified."