I asked Mats Ek today how to handle a megalomaniac psychopath. He concluded that I probably meant narcissist and the advice he gave were so great that I have to share them and expand on them. I also Storified the answer in Swedish.
Take don't take either positive or negative feedback too seriously.
Minimize contact. Do not make yourself dependent on this person.
There is no point in trying to improve their behaviour or in any way change them.
Their actions and relationship to you probably serves a goal of their own (and doesn't concern you as a person). You are seen as an aim to that goal. Therefore, their behaviour towards you may seem erratic and uncomfortable.
In order to understand the narcissist's behaviour towards you, you need to figure out what their goals are, that's the key. For this you probably need outside help.