Musar for Berakhot 9:2
א"ר לוי בר חמא אמר ר"ש בן לקיש לעולם ירגיז אדם יצר טוב על יצר הרע שנא' (תהלים ד, ה) רגזו ואל תחטאו. אם נצחו מוטב ואם לאו יעסוק בתורה שנאמר אמרו בלבבכם אם נצחו מוטב ואם לאו יקרא קריאת שמע שנאמר על משכבכם אם נצחו מוטב ואם לאו יזכור לו יום המיתה שנאמר ודומו סלה.
R. Levi b. Hamma said in the name of R. Simeon b. Lakish: A man should always oppose [yargiz] the good impulse to the evil impulse ; as it is said : "Tremble [rigzu] and sin not" (ibid. iv. 5). If he conquer it, well and good ; but if not, let him occupy himself with Torah ; as it is said, "Commune with your own heart" (ibid.). Should this gain him the victory, well and good; but if not, let him read the Shema' ; as it is said, "Upon your bed." If he conquer it, well and good ; but if not, let him reflect upon the day of death; as it is said, "And be still. Selah."