What is the meaning of "Asher Yada Levavcha"?
Radak: Even though many saw and heard what you did to my father David, you yourself know your evil intent more than your mouth said.
Malbim: He could say that he was Shogeg for cursing; he thought that David was pursued due to his sins, and Hashem abandoned him. However, Hashem caused you to transgress the Shevu'ah and die via David's son - this shows that your heart knew the evil, i.e. you were Mezid, and not Shogeg. This is why Hashem returned the evil upon your head!
Why did he say that Hashem returned the evil upon his head?
Radak: Hashem caused this. This is like "veha'Elokim Inah l'Yado" (Shemos 31:13) - because you were Chayav Misah for cursing David, and he swore not to kill you, Hashem brought through you something else for which you are Chayav Misah, i.e. transgressing Shevu'as Hashem and my command. 1