"You shall be holy" (Leviticus 19:2). Rabbi Pinchas the Priest bar Hama said in the name of Rabbi Reuven: What is the meaning of that which is written, "And I heard behind me a great rushing sound" (Ezekiel 3:12)? What is "behind me"? After I and my fellows praised Him, I heard the ministering angels praising Him, and they said, "Blessed is the glory of the Lord from His place" (ibid.). And it says, "When the morning stars sang together" (Job 38:7), and afterward, "and all the sons of God shouted for joy" (ibid.). Rabbi Mani said: Let not the recitation of the Shema be light in your eyes, for in it are two hundred and forty-eight words, corresponding to the limbs that are in a person; and among them is "Blessed is the name of the glory of His kingdom forever and ever." The Holy One, blessed be He, said: If you have kept what is Mine, to recite it as ordained, I too will keep what is yours. Therefore David offers praise, "Keep me as the pupil of the eye" (Psalms 17:8). The Holy One, blessed be He, said to him, "Keep My commandments and live" (Proverbs 4:4). Rabbi Shimon ben Halafta said: To what is the matter comparable? To a man who is in the Galilee and has a vineyard in Judea, and another in Judea who has a vineyard in the Galilee. The one in the Galilee goes to Judea to hoe his vineyard, and the one in Judea goes to the Galilee to hoe his vineyard. They met one with the other, and said to each other: Until you come to my place, keep watch over what is mine in your district, and I will keep watch over what is yours in my district. So David said, "Keep me as the pupil of the eye." The Holy One, blessed be He, said to him, "Keep My commandments and live." Thus said the Holy One, blessed be He, to Israel: Keep My commandments, the commandment of reciting the Shema morning and evening, and I will keep you, as it is said, "The Lord shall keep you from all evil; He shall keep your soul" (Psalms 121:7).
Keep the Shema and God Keeps You - Tanchuma on Holiness
Midrash Tanchuma Buber, Kedoshim 6:1
קדושים תהיו. אמר ר' פנחס הכהן בר חמא אמר ר' ראובן מהו דכתיב ואשמע אחרי קול רעש גדול (יחזקאל ג יב), מהו אחרי, אחרי שקילסתי אני וחבירי שמעתי מלאכי השרת שקילסוהו, ואמרו ברוך כבוד ה' ממקומו (שם), ואומר ברן יחד כוכבי בוקר (איוב לח ז), והדר ויריעו כל בני אלהים (שם), אמר ר' מני לא תהא קריית שמע קלה בעיניך, מפני שיש בה רמ"ח תיבות, כנגד אברים שבאדם, ומהם ברוך שם כבוד מלכותו לעולם ועד, אמר הקב"ה אם שמרתם שלי לקרותה כתיקנה, אף אני אשמור את שלכם, לכך דוד מקלס שמרני כאישון בת עין (תהלים יז ח), א"ל הקב"ה שמר מצותי וחיה (משלי ד ד). אמר ר' שמעון בן חלפתא למה הדבר דומה, לאדם שהוא בגליל ויש לו כרם ביהודה, ואחד ביהודה ויש לו כרם בגליל, אותו שבגליל הולך ליהודה לעדר את כרמו, אותו שביהודה הולך לגליל לעדר את כרמו, עמדו זה עם זה, אמרו זה לזה, עד שתבא אתה למקומי שמור שלי בתחומך, ואני אשמור שלך בתחומי, כך אמר דוד שמרני כאישון בית עין, אמר לו הקב"ה שמר מצותי והיה, כך אמר הקב"ה לישראל, שמרו מצותי, מצות קריית שמע שחרית וערבית, ואני משמר אתכם, שנאמר ' ישמרך מכל רע ישמר את נפשך (תהלים קכא ז).