
that's a good question! i benefitted from utilizing a therapist to better understand what was making me feel lonely or insecure. i made a list of the things like for instance why i felt insecure. what were the feelings i had when i felt that way. many of my thoughts about myself were incorrect. i called them "old tapes". with the help of my T we untangled the mess of false beliefs and replaced the old tapes with new true ones.
i'll give you an example:
i'm insecure because
i don't think i'm worthy of having a good friend.
the key word there is i
don't feel worthy.
they key is that is a
false belief. everyone is worthy of many things. why shouldn't i feel worthy? i'm likeable, caring of others, trustworthy.
so we replaced the false belief to a real and true belief about myself.
i am worthy of having a good friend because i'm caring of others.,etc.
i have simplified the example but i hope this helps you.

it's difficult to untangle all this by youself. i'd encourage you to see a therarpist to help you with these feelings. hope you'll let us know how u're doing.