oh man, you've stumbled into my area of expertise.
first thing's first: remember that you don't owe anyone romantic attention. it's not your job to make the other person happy-- it's your job to take care of yourself first and foremost. i know it's tempting to apologize to the other person when you turn them down, but i'm going to gently nudge you to resist that temptation. be kind to them, but be firm and clear with your boundaries.
speaking of being clear: it might be tempting to hide behind ambiguity or to say that you'll consider them, even when you know in your heart that you won't, in an attempt to save their feelings. again, i'm going to gently nudge you away from that impulse; the other person needs you to be direct and concrete so that they can process the rejection and start to move on.
if you only see them as a friend and don't ever see that changing, you can emphasize how much the friendship means to you and how much you will continue to value it. tell them that you appreciate their maturity in respecting your boundaries, because showing that faith in their maturity will encourage them to live up to it. clarify that this person is important to you (if they are), but keep it concise and try to avoid coming across as pitying. that's not what they need right now.
after you turn someone down, it may take them a few days to a few weeks to process their feelings about the rejection; offer them the space they need and tell them that you'll wait for them to reinitiate contact. this'll give them some control over their processing and will alleviate the worry that they'll have to act normal around you before they're ready.
if they respond by trying to push your boundaries, hounding you, demanding an explanation, or initiating a breakdown in an attempt to make you the person who takes care of them: shut that shit down immediately. reaffirm your boundaries and explain that their continuing to interact with you hinges on their being respectful. if they continue to push, leave. congratulations, you just dodged a major bullet.
most importantly, take a little time after the conversation to check in with yourself. turning someone down always sucks and your feelings deserve just as much consideration as theirs in the aftermath. treat yourself with the compassion you would treat a close friend with.
best of luck and keep us updated!