"And what will You do for Your great Name?" (Joshua 7:9). Resh Lakish in the name of Rabbi Yannai said: the Holy One, blessed be He, joined His Name with Israel. A parable: to a king who had keys to a small palace. The king said, if I leave them as they are, they will be lost; rather, I will make a small chain, so that if it is lost, the chain will give evidence about it. So the Holy One, blessed be He, said: if I leave Israel as they are, they will be swallowed up among the nations; rather, I will join My great Name among them, and they will live, as it is written, "What will You do for Your great Name?" the one joined with us. Immediately, "And the LORD said to Joshua: Arise" (Joshua 7:10) -- "Arise for yourself," referring to that which you mentioned.
God Binds His Great Name Into the Life of Israel
Yalkut Shimoni on Nach 17:6
ומה תעשה לשמך הגדול (יהושע ז, ט). ריש לקיש בשם רבי ינאי אמר שתף הקב"ה שמו בישראל. משל למלך שהיה לו מפתחות של פלטרין קטנה אמר המלך אם אני מניחה כמות שהיא אבודה אלא הריני עושה שלשלת קטנה שאם אבדה תהא מוכחת עליה. כך אמר הקב"ה אם אני מניח את ישראל כמות שהם יהיו נבלעים בין האומות אלא הריני משתף שמי הגדול ביניהם והם חיים כמו שכתוב מה תעשה לשמך הגדול, המשותף בנו. מיד ויאמר ה' אל יהושע קום לך קום לך ההיא דאדכרתא: