(1) The phrase “Love your neighbor as yourself” cannot be meant literally, since man cannot be expected to love his neighbor as himself. Moreover, Rabbi Akiva has ruled that “Your life comes first.” The Torah here enjoins us that we should wish upon our neighbor the same benefits that we wish upon ourselves. Perhaps, this is the reason for the dative instead of the accusative form of the verb phrase; we find the same in “And you shall love him as yourself” (19:34). Indeed, sometimes a person may wish upon his neighbor certain benefits, but only wealth, not wisdom and the like. But even if he wishes his cherished friend well in everything, i.e. wealth, honor, learning, and wisdom, he will not do so unstintingly; he will still insist on a larger share of the benefits. It is this shortcoming that the Torah condemned. Rather, a man should wish his fellow well in everything, just as he does in his own case, and he should place no limitations on his love. Therefore, in the case of Yonatan and David (I Shemuel 20:17), it says that Yonatan “loved him as his own soul,” since he had removed all jealousy from his heart, declaring “And you shall rule over Israel” (ibid. 23:17).
ואהבת לרעך כמוך. א״א לפרש כמשמעו כידוע דחייך קודם לחיי חבירך אלא הרמב״ם פי׳ בהל׳ אבל פי״ד כמו שאתה חפץ מחברך. והדבר מובן שלא יסכל האדם שחבירו יאהבהו כמו נפש עצמו אלא בגדר הראוי לפי הקורבה וד״א. באותו אופן עליך לאהוב בני אדם. ולפי זה הפי׳ קאי בסמיכות לאזהרה הקודמת שכמו שאתה חפץ אם עשית רעה לאדם שלא ינקום ממך אלא יעבור על פשעך כך תנהג עם רעך...
It is impossible to explain this literally, as it is known that your life takes precedence over the life of another. However, Maimonides in the Laws of Mourning..explains that it means as you would wish for another to do for you. This is understandable, as one would not be foolish enough to think that another person will love them as much as they love themselves, but rather only as is appropriate based on how close they are and derekh eretz (what is natural). In the same way, one must love other people.
Using this explanation, the juxtaposition with the previous admonition makes sense: Just as you would not want someone to take revenge on you if you wrong another person, but rather you would want them to forgive you, this is how you should behave with your fellow.
כָּל אַהֲבָה שֶׁהִיא תְלוּיָה בְדָבָר, בָּטֵל דָּבָר, בְּטֵלָה אַהֲבָה. וְשֶׁאֵינָהּ תְּלוּיָה בְדָבָר, אֵינָהּ בְּטֵלָה לְעוֹלָם. אֵיזוֹ הִיא אַהֲבָה הַתְּלוּיָה בְדָבָר, זוֹ אַהֲבַת אַמְנוֹן וְתָמָר. וְשֶׁאֵינָהּ תְּלוּיָה בְדָבָר, זוֹ אַהֲבַת דָּוִד וִיהוֹנָתָן:
(33) When a stranger resides with you in your land, you shall not wrong him. (34) The stranger who resides with you shall be to you as one of your citizens; you shall love him as yourself, for you were strangers in the land of Egypt: I the LORD am your God.
Rabbi Lord Jonathan Sacks, Faith in the Future, p. 78
"The Hebrew Bible contains the great command, ‘You shall love your neighbour as yourself’ (Leviticus 19:18), and this has often been taken as the basis of biblical morality. But it is not: it is only part of it. The Jewish sages noted that on only one occasion does the Hebrew Bible command us to love our neighbour, but in thirty-seven places it commands us to love the stranger. Our neighbour is one we love because he is like ourselves. The stranger is one we are taught to love precisely because he is not like ourselves.”
Eternal love I conceived for you then;
Therefore I continue My grace to you.
An excerpt from an article on Hebrew Word Study :
"Note how He describes His love. How does He love us? With an olam ‘ahavath – everlasting love. Interesting that He uses the word ‘ahav and not recham for love. Racham is a natural love like a mother has for a child in her womb. That child did nothing to earn that love, it is just natural. ‘Ahav is a love that is growing and changing."(https://www.chaimbentorah.com/2018/06/hebrew-word-study-everlasting-love/)