Listen my friend, you are not useless. You have value and worth. Loneliness can fool you into thinking otherwise, but people are fickle and rejection is not a reflection on your worth.
Like
@Hobgoblin said, go see a professional. There are people trained to listen and there are people trained to help with supplemental help, be it dietary supplements or medications. But when you are this run down, you probably need some help rejuvenating. But the exhaustion that leads to thoughts of uselessness or worthlessness shouldn’t go unchecked because those thoughts are lies.
You aren’t useless.