I don't know how to love anyone
Whens the last time you tried to love someone?
I'm tired of banging my head against the wall for no good reason
It is hard to learn to  love but if you don't try then you will be alone for the rest of your life. You have to work hard for it.
I'm afraid of failing.
Failure is a real possibility but you shouldn't let it deter you. Eventually you'll learn how to love someone and you'll be able to reap the rewards from such an emotional connection.