Could just be coping with underlying pain and then due to feeling bad projecting it onto others or feeling insecure towards others.
Try looking into self-acceptance and learning to accept oneself and ones emotions. It'll really help.
A great book on this is called The Gifts of Imperfection by Brene Brown, check it out on Amazon.
Deep down, you're okay