Personality disorders can create a distorted self-image.
Most of the truly rotten villains in fiction are what used to be called “psychopaths.” (Now clinically known as people with ASPD: Anti-Social Personality Disorder.) These are people who have no conscience and no empathy.
But psychopaths can make boring fiction. Psychopathic villains have pretty uncomplicated motives. They’re usually sexually twisted sadists or conscience-free monsters who do evil things because they’re, well…evil.
And not all people with ASPD need to be villains. Benedict Cumberbatch’s version of Sherlock Holmes has the ASPD detachment from normal human emotions like guilt and empathy. Plenty of people with the disorder lead normal, non-criminal lives. Even a conscience-free person needs a reason to commit a crime.
But you can create more interesting antagonists if you give them more relatable personality disorders.