How can I stop dwelling on all the things I can´t do anymore?

Cognitive Therapy. Cognitive behavior therapy can be helpful in learning to challenge automatic negative thinking.
Dwelling. We all have to learn how to accept our limitatons as we age. Whatever it is that you can no longer do look to new challenges that may proves as satisfying. For instance people who can no longer take up cycling. Look to new opportunities rather than dwelling on what you can't do but open up to friends as well about your concerns so you have opportunties to adjust with friends.