There is a book called "Blue Like Jazz." It's written by Donald Miller. In it, Miller says that any person who think of himself or herself as unlovable cannot be in a true relationship with God. This is because they can't accept who God is --- a being that is love.
We learn that we are lovable or unlovable from other people - usually before we even meet God or become cognizant of who he is. So when others love us and teach us that we are lovable, we can better interact with God. Our relationship with Him is based on love.