The possuk in Re'ah (12:5) says כי אם אל המקום אשר יבחר ה אלקיכם מכל שבטיכם לשום א שמו שם לשכנו תדרשו ובאת שמה. On the one hand the possuk calls it the place chosen by Hashem, המקום אשר יבחר ה אלקיכם, but on the other hand the possuk says לשכנו תדרשו, you have to seek it out. Is it chosen or must it be sought? The Malbim says that even though the exact place of the Mikdash was notified through the navi, Dovid still attempted to find the place before the prophet came to him, for the לשכנו תדרשו, the desire, the seeking, is a prerequisite for receiving the message of the המקום אשר יבחר ה, the place notified by Hashem.
The Gemarah Sukkah (41a) says מנא לן דעבדינן זכר למקדש א"ר יוחנן דאמר קרא (ירמיהו ל, יז) כי אעלה ארוכה לך וממכותיך ארפאך נאם ה' כי נדחה קראו לך ציון היא דורש אין לה דורש אין לה מכלל דבעיא דרישה. In light of this Malbim, this is not just a nice idea to remember the Mikdash even in its destruction, but the way to rebuild the Mikdash is to be דורש המקדש, to express a desire to have it built (from a shmuz by R' Elefant.)
The Chasam Sofer on the Gemarah Sukkah says that is why the redemption of the second Mikdash was incomplete, because there was no דרישה, there was no expressed desire from Klal Yisrael to rebuild the Mikdash and that is what the possuk in Yermiyahu is saying, ממכותיך ארפאך, you will have a healing from the destruction of the first Mikdash, but not a healing that proceeds the makkah, because there is no דרישה, there is no yearning to rebuild the Mikdash, hence it will merely be a temporary building.
At the end of Massay the Torah instructs woman to marry within their own tribe so that if they inherit, they will not transfer the land to a different tribe, (36:7) וְלֹֽא־תִסֹּ֤ב נַחֲלָה֙ לִבְנֵ֣י יִשְׂרָאֵ֔ל מִמַּטֶּ֖ה אֶל־מַטֶּ֑ה. However ,the same point is reiterated to verses later, וְלֹֽא־תִסֹּ֧ב נַחֲלָ֛ה מִמַּטֶּ֖ה לְמַטֶּ֣ה אַחֵ֑ר. The Or Hachayim asks why the repetion? Furthermore, why the switch in terminology, מִמַּטֶּ֖ה אֶל־מַטֶּ֑ה to מִמַּטֶּ֖ה לְמַטֶּ֣ה אַחֵ֑ר? The Rodamsker (cited in Divrei Chaim 2021 and 2019,) explains that the parsha was given due to the complaint of the tribe of Yosef that they would lose the land given to the daughters of Tzlafchad. It was the desire of the tribe of Yosef to hang on to the land that caused the prohibition of marrying outside the tribe. It was the desire that created the issur. Says the Rodamsker, from this we are to understand that is it the desire that creates our hold over Eretz Yisrael and the Mikdash. That's why it is called דביר ביתך - "לשון דבור שצריך לבקש מהש"י עליו להבנות במהרה וכל המתאבל על חורבן ירושלים זוכה ורואה בנחמתה כי כל האומר כן באמת בתפלה ולירושלים עירך ברחמים תשוב הנה פועל באמת זה למעלה על קירוב הגאולה כנ"ל." So he says by way of derush the first possuk is the prohibition of marrying into another tribe and causing the land to move to another shevet, ממטה אל מטה. The second possuk is telling us that from the prohibition one should take a message to feel the pain over the fact that the נחלה of Yerushalayim is now in the hands of "ביד האחרים הישמעאלי' היושבי' עליה בעוה"ר וצריך להתעורר בתשוקה להמשיך הדין הזה להתקיי' לא תסוב נחלה למטה אחר הם הישמעאלי' כנ"ל."
Rav Solevetchik (Rishimos Shiurim on the Gemarah Sukkah) differentiates between laws of זכר למקדש intended to arouse mourning over the destruction of the Mikdash vs. the זכר למקדש of the Gemarah in Sukkah which is a זכר למקדש as a positive remembrance of the mitzvot as done in the Mikdash, not to remember the past but as a preparation for the future when the Mikdash will be rebuilt. This זכר למקדש is a forward-looking remembrance, not about what was lost, but about what will be restored. It’s not nostalgia, it’s anticipation. However, in light of the above, it is understood that the point of the mourning is not to be stuck in the past but to awaken feelings of yearning and longing for the Mikdash which serve as preparation of building Mikdash, in the Rodamsker's words," כי כל האומר כן באמת בתפלה ולירושלים עירך ברחמים תשוב הנה פועל באמת זה למעלה על קירוב הגאולה."