You ask a good question. It is very hard to believe, in the face of overwhelming doubt, that you are worthwhile. However if you were to maintain that you are valuable then despite yourself in this dark hour you will be the shining example someday. You need no confidence, that's empty, just faith in what you are and what you stand for. The rest really does take care of itself.
Still, there are no magic tricks; you have to choose to overcome this by keeping an open mind, staying positive, and when you waiver standing back up and dusting off. Much, much harder to do than anything else.
a lot of average guys won't get much attention from girls that's the reality of being average I guess . there just isn't any reason for girls to be really interested or pay attention to average guys so maybe you have to do something to make yourself a bit more interesting or less average to become more datable
Basically if your decent looking you don't need to have as much of a personality to stand out, if your average or not so good looking you have to have a better personality to compensate and do things which make you unique, funny and stand out. Just have to engage with girls in a interesting matter to begin with to immediately gauge their interest if you don't have the looks to do it for you. Generally speaking of course, too many variables.