What do I do?

I'm only 23 and I feel like my life is over. I feel like all of the good things that could happen to me already have and all that is ahead of me is pain and death. There's nothing to look forward to and my mind goes on these loops of negative thoughts about myself and my past mistakes that I can't seem to get out of.

What do I do?