In your case it is called projection, when the perp is really yourself.

It appears that you are trying to defend your own unconscious impulses and qualities by pretending they do not exist while falsely seeing these negative qualities in others.