וְעַתָּ֖ה עֲשׂ֑וּ כִּ֣י יְהוָ֗ה אָמַ֤ר אֶל־דָּוִד֙ לֵאמֹ֔ר בְּיַ֣ד ׀ דָּוִ֣ד עַבְדִּ֗י הוֹשִׁ֜יעַ אֶת־עַמִּ֤י יִשְׂרָאֵל֙ מִיַּ֣ד פְּלִשְׁתִּ֔ים וּמִיַּ֖ד כָּל־אֹיְבֵיהֶֽם׃
Und nun handelt danach; denn der Herr hat von David also gesprochen: Durch die Hand meines Knechtes David will ich retten mein Volk Israel aus der Hand der Philister und aus der Hand aller Feinde.
Sforno
לא תעשו לכם, even though you yourselves are now subservient to the pagans, as for instance the Jew who was forced to sell himself to a pagan, you must not trade your dignity, i.e. your religion, for a religion which is totally useless. Although this whole line appears superfluous, as the Torah had spoken on this subject repeatedly, the Torah here inserts this line so that people who due to force of circumstances had to enter the service of pagans, and who attribute this to their own G’d having abandoned them, do not commit the additional error of thinking that Judaism no longer has a claim on them in such circumstances. In Ezekiel chapter 20 the prophet dealt with the people who wanted to know how G’d could still have a claim on them seeing he had “sold” them to the pagans into exile. The matter was compared to a husband who had divorced his wife and continued to dictate to her. One of the most convincing answers is that G’d continues to speak of “My servant David” in Samuel II 3,18, the same description G’d applies to Nevuchadnezzar in Jeremiah 28,9. In other words, no human being whether out of his own volition or because he considers himself rejected by G’d, is ever free from the obligation to serve the Creator, His ultimate Master. At the end of the תוכחה, the predictions of the retribution we will experience for failure to observe G’d’s commandments, (Leviticus 26,44) G’d is on record as saying that even when the Jewish people have reached a historic low in their fortunes, G’d did not despise them nor abandon them permanently.
Rashi
You are My son The head over Israel, who are called “My firstborn son.” And they will endure through you, as is stated concerning Abner (II Sam. 3:18): “for God said, etc., ‘By the hand of My bondsman David shall I deliver...Israel.’” And for their sake, you are before Me as a son because they are all dependent upon you.
Rashi
I will exult in His salvation. In another explanation, I found: God spoke in His Sanctuaryto help me, as it is written (II Sam. 3:18): “For (sic) by the hand of My bondsman David shall I deliver My people Israel.”