you can't.
it's inevitable that they will feel hurt. easier to direct that anger and frustration towards themselves for not doing enough regardless of what you say.
the best way is to distance yourself from people you are close with is over time. you understand that you will go one day, and to make it easier on them and to alleviate the impact from the blow, break that bond and cut ties well in advance.
you also don't need to tell the person either that you're looking to CTB. you care about them, want the best for that person, so let them go ahead of time, allowing the rupture from that breakup to settle in and for them to slowly heal without you being in their life, while you focus your sights on your decision to CTB.
much more difficult to do it abruptly. cannot navigate past it last minute. it has to be done thoroughly ahead of time.
for reference, broke bonds with multiple childhood friends that I've known for 10+ years. it was difficult, but necessary because i wanted to go and understood i needed to be alone for that to happen. i also recognized i cared about them, and to make it easier for me to go, i needed to make sure they weren't in my life so i didn't have that attachment to care about while wanting to do the best to make sure it doesn't hit as hard for them.
been 4 years since then and have been completely alone but I've stayed committed to being seperated from people i had deep bonds with. it's painful, but it's the right thing to do and i feel much more comfortable knowing they've likely moved on, and that my death will not have as much of an impact as it would have if we stayed close. i also feel more free with my decision.
best of luck.