This is golden heart syndrome, the act of throwing one self away from potential romance in belief that "they deserve better". Golden heart syndrome also has other side effects, such as refusing to ask someone out because the person they are going to ask might already be spoken for, thus it would be intrusive on that person's relationship.
Beautiful lady: "Hey, welcome to PC shop, what can I help you with?"
Shy dude: "Umm uhhh right, I was uh.. Looking for a... Actually, I think I need to go..."
*Shy dude rushes out the door, sweating and nervous to get fresh air.*
Shy dude: "I don't deserve her. She needs someone better than me."
Pedestrian: "You ok pal? You look all riled up!"
Shy dude: "Oh me? I... I think i'll be ok..."