Why did David compose this Mizmor?
Malbim: It counters the idolaters in David's time, and shows the difference between those who serve Hashem and guard His Torah, and those who follow folly. David thanks for his portion, that Hashem separated him from those who err.
What is the meaning of "Michtam"?
Rashi (citing Sotah 10b) #1: It is of David, who was Mach (humble) and Tam. His Makah (the place of circumcision, which is normally wounded) was Tam (immaculate) 1 , for he was born circumcised 2 .
Sotah 10b #2: "Michtam" - his Machus (humility) was Tam (complete), from his youth to his maturity.
Rashi #1: It is a kind of song.
Rashi #2: It is an expression of a crown, like Kessem 3 . David regularly said "Shamreni Kel Ki Chasisi Vach." It was like a crown for him - "Hashem ka'Tzinah Retzon Taterenu" (5:13).
Here Rashi implies that this is all one Perush. The Gemara considers them to be different Perushim! (PF) Rashi (10b) - Mach is humble, and Tam is pure in all his ways.
Rashi: When it says "l'David Michtam", it is proper to expound so, but not here, that it says "Michtam l'David"!
Perhaps this is like "Rosh Kesem Paz" (Shir ha'Shirim 5:11). There, Ibn Ezra said that Kesem is a round ornament, but Rashi said that it is a treasure. (PF)
Why did he request to be guarded?
Malbim: I ask You alone to guard me; I trust only in You, and not in other higher powers.
Why did he use the name "Kel"?
Radak: You have the ability 1 - therefore I call to You to guard me.
Also the name "Elokim" teaches about Hashem's ability, but that is a name of Din; Kel is a name of Chesed - "Chesed Kel Kol ha'Yom" (52:3). (PF. Also refer to Bamidbar 22:18:153:1, 22:18:153:1***).