Hey there,
Welcome to the forums :) I'm proud of you that you're putting yourself first and setting these boundaries. I think real friendships get stronger when you open up the ability to be honest. Depending on the relationships you have with these people, how do you think it would go if you were honest with them? Of course there's a way to go about it so you don't come across as rude.. But most of the time the fear of being rude dampens honesty.
There's nothing objectively wrong or rude about needing space and setting boundaries with friends. If you were honest about your mental health, and needing to be alone to process, wouldn't a good friend appreciate the honesty and respect your space, and hope that you're doing well?
Sorry if I'm rambling haha. I just wish we wouldn't have to feel guilt for things like this, but of course it's natural. I also think it's completely fine to not be obligated to tell them your reasons, because of course you don't have to. But perhaps one off excuses can't last forever, and they may catch on that there's another issue and may think there's something wrong with them or the friendships, etc. from not having answers.