The set expression בעיני is very common with the meaning "in the opinion of; from the perspective of."[1] Modifying הָרַע, it means that the psalmist has done what God considers to be evil.[2]