What do you mean by "stop trying" or "give up"?
I'm single, been so most of my adult life, and whilst yes I would like a relationship (notwithstanding the problems folk post about on here!) I'm just concentrating on living my life for what it is. Not for what it might be, or could be. I'm working, going to nights out, member of various clubs / groups where I engage with "people", who get to know "me". They've all seen me bigger, and having lost weight; with my hair done and not; they've seen me excel at my job and struggle; with make-up on and looking deathly pale without etc. OK I've not married any of them, but I don't think any of them are totally repulsed by me.
Sadly, you could have had a relationship for the last 20 years, and it could have been abusive or unfaithful or whatever, so be careful of wishing for what everyone else has has. That proverbial grass isn't always greener.
That said, genuinely, what is it that makes you describe yourself as "ugly"? If you think it's an issue - and I suspect it's probably not - but can you do something about it. Can you get your hair cut, wear make-up, lose or gain weight, wear different clothes style? I'm not suggesting the potential love of your life is so superficial to write you off as ugly today, but fall madly in love with you tomorrow because your hair is different or you're wearing lipstick .... but would it change your opinion of yourself?
I know it's difficult, but if you think you're "ugly", you'll be throwing off negative vibes ..... I can sense that just in your posts here, so anyone you speak to or message online possibly thinks it too. Are they not staying in touch because they think life with you could be tough, always sounding negative, nothing works etc rather than any perception of being "ugly" (whatever that is).