Having self-compassion is not the same as being selfish or self centred. Acknowledge your pain, your failure, your difficulty. It is part of the human journey. It will lessen, it will pass and it will teach...in time.
What kindness would you give your friend suffering as you are now? Be that friend to yourself.
If we cannot look after ourselves, we will not be strong enough to look after others.