You can never completely prevent someone from feeling abandoned. Even when that is not your intention, this feeling can still be triggered. That does not mean you are actually rejecting someone. A boundary does not have to be a rejection, but is rather intended to keep the relationship healthy and in balance. The way you set a boundary, and the moment you do so, can have a major influence on how the other person experiences it.
Explain why you are setting a boundary and do this from your own needs. If your loved one really wants to talk to you, but you notice that you don't have the space for that, you could say, for example: “I would love to listen to you attentively, but my mind is a bit too full right now. Can I get back to you on this later?” This is how you show that you care while also taking good care of yourself.
Try to set boundaries on time, so you don't slowly become overwhelmed and eventually have to draw a hard line all at once. At the same time, it is important not to let others cross your boundaries. You always have the right to protect your boundaries, even when that feels painful or difficult for the other person.
Finally: sometimes boundaries really need to be firm and clear, for example when someone is shouting at you, becomes violent, or otherwise heavily crosses your boundary. That is not only justified, but also necessary – for your own safety and for the relationship.