try to not let him dictate my moods

I am really going to try not to let him dictate my moods and how I react to his moods.  He can change his moods and personality in seconds which makes me nuts because I never know what to expect.  When he is nice I feel bad and think of the good times, but then he can turn nasty which either gets me mad or crazy.  I just need to not let him get to me.