This can be restated to remove the abstract noun "wrongdoing." The idiom, "put evil before my eyes," means to approve of it. Alternate translation: "I will not approve of anyone doing anything that is wrong in my presence" (See: [[rc://en/ta/man/translate/figs-abstractnouns]] and [[rc://en/ta/man/translate/figs-idiom]])
David describes "evil" as if it were something unable to cling to him. This means that he would avoid evil things and people doing evil things. Alternate translation: "I will completely avoid evil" (See: [[rc://en/ta/man/translate/figs-personification]])