“You have loved righteousness and hated wickedness. Therefore God, your God, has anointed you with the oil of gladness beyond your companions.”
These “companions” were not bad guys.
The psalmist is probably speaking of other Israelite royalty, so Jesus had something significant in common with them despite their human failings: they were all kings. People like David, Solomon and Hezekiah. They served God, they honored God, and they led his people out to victory.
Not bad guys at all, some of them.