It’s really easy to accidentally learn to apologize like this, especially when you have mental health issues that mean you genuinely feel that way about yourself. You aren’t a bad person if this has become a habit, but you can help other people AND yourself by apologizing differently!
Try to focus on your actions rather than your traits:
E.g. “I’m sorry I keep ghosting you, I’m shit at friendships” –> “I’m sorry I keep ghosting you, I’m really struggling to keep up with my friends right now”
Then, if you can, turn the conversation back to the other person - you’re apologising because their feelings matter to you, so show that.
E.g. “I don’t mean to - our friendship means a lit to me, and I know it must make it seem like I don’t care.”
This gives the other person an opportunity to express their own experience so you can talk it over more if they want to, without skipping ahead to reassuring you that the relationship isn’t broken.
If you read the descriptions above and started feeling guilty, it’s fixable! And if you want, you can even apply your new apology skills to apologising for an old apology style