I would ask you to consider very careful what (((( shatteredhopes )))) said.
what you say reminds me VERY much of what I was thinking and feeling when I was at my lowest point, in June last year. One of the particular and most dangerous aspects of my depression is what my suppert workers called " catastrophising ". Something bad happens and it triggers fear and anxiety in me out of all proportion to the event. smal, fears become vast terrors, I miss my bus and become convinced that the world is doomed!!!!
So, I am not, in any way, shape or form, dismissing your feelings. I know, from my actual personal experience, how real, powerful, and frightening they are. It is because I have had the experience that I have, that I feel comnpelled to disagree with you.
When I feel anxious and depressed, I have to work to avoid being swept away by my feelings. I have to force myself to think logically, coldly, rationally about what triggered my feelings. " Just the facts, Ma'am. ", as Jack Webb used to say on Dragnet.
I have to be honest with you, ( Otherwise what's the point in anyone posting anything, on this site, or any other?

So, here goes.....
1. You state as a fact that you have no competence as a writer. " Since writing is the only thing that I can do with any mild competence and yet it seems like I don't even have that. "
I would submit that there is no HARD evidence that I can see to support this conclusion.
I remain concerned that you are extrapolating a too final and too rigid a conclusion, from too small and unreliable a sample of evidence.
I may be wrong, I don't know you. ( I'm in my forties, and I'm not sure if I really know me.

) However, I remain very doubtful about the quality of feedback that you got from that writers group, and I suspect that your depression, as mine does, may be colouring your self-image.
Also, I have to admit that there seems to me to be no real logic in your conclusion. " So really that means that I have no real use in life. "
Being a writer would be a fine and wonderful thing to be, It is something I woud SO, SO, SOOOOOO want to be. Stories have always fascinated, comforted, to some extent even healed me in the decades since I've learned to read. I have have the greatest respect, and admiration for the writers who have changed, enriched, sometimes almost even saved my life.
However, to say that if you can't be a writer you have no use in life, is I would have to say leaping to a conclusion that I would have to say is simply unfounded, based on my own experience at least. I have the greatest respect for doctors, particularly the ones who saved my life by giving me the help I needed, just when I needed it!!!!!!!! I would very much to be a doctor. The healer's calling is an honourable and fine one. But I can't. I don't have that in me. I can't stand the sight of blood, illness scares me, and I could never achieve the necessary " professional detachment ", that balance between distance and empathy that a good doctor has to have to help people, or even to survive themselves.
Do, I think that it would be rational for me to say that if I can't be a doctor, then I have no real purpose in life? No I don't. I f I can't be a doctor, then I'll be something else. If I can't be a writer, then I'll be something else. But, as long as I'm alive I have the hope that I have the chance to be SOMETHING. As, I remain convinced you do.
So, I would agree with (((( shatteredhopes )))), based purely on your writing skills that you've demonstrated on this thread, I would submit that you have writing skills at least equal to some published authors that I've read. In the forty-odd years I've been reading I have read some ABSOLUTE TRIPE AND UTTER DRIVEL!!!! ( I recently read a SF novel that I simply gave up on, it was so oddly written. The writer got bogged down in a four-page rant against " socialized medicine ", that not only had NOTHING to do with the plot, but angered mre so much I stopped reading. Like most British people I'm ardently pro- " socialized medicine." ! ) And yet somehow it gets published and paid for. S, why not keep writing and see what happens. ( If you write a novel and it's published I WILL SO be saying, " Told you so. "
Also, as (((( shatteredhopes )))) said, you are waaaaaay too young to be SURE that you don't have a purpose, or what that purpose may be. Some of my best, most precious experiences in my life happened to me when I was on my way to somewhere else....
PLEASE, PLEASE, PLEASE give yourself the same chance....( Just some thoughts. I only have my own experience to talk about.