Thanks, and we're so happy you find it helpful!
Noone else is hurt by an idea or a thought we have in our minds. We're allowed to keep our minds as a private space. I'm a big, big fan of openness and honesty; the thing is, even complete openness and honesty doesn't require us to share every thought in our minds. I think it's very much a part of being human that sometimes our minds follow thoughts and ideas that we don't agree with at all, or that we might find quite dark, or that we seem to want to explore as an idea but would utterly reject in reality. All of that is ok, and doesn't make any of us a bad or hurtful person.
I understand that your partner would be hurt by this fantasy. What you're saying, though, is that this fantasy is completely and only within your head, and you have no intention whatsoever of wanting to carry it out. Your mind is your own private space, and your thoughts - just thoughts - can't hurt your partner or anyone else.
It's fairly common for people to fantasise about things that they truly wouldn't want to do in reality, both sexually and non-sexually. Too, even if this fantasy were something you might want to do if it wouldn't upset your partner, it's still ok to have it: our desires don't always align with a partner's, and we're allowed to have a fantasy life that suits our own desires while still not ever, in reality, wanting to do a thing that would hurt our partner.
You've done nothing here To feel guilty about: you've done nothing wrong. I think that trying to let go of these feelings of guilt as much as you can will help some in trying to put the space you want between yourself and the fantasy: feelings of guilt tend to be pretty strong, and it's possible that the guilt feelings are bringing the fantasy back to you more often and strongly than it would otherwise.
I do hear that you're feeling distressed by this fantasy when it comes to you. If you find it disturbing and that it's interrupting your enjoyment of sex (including masturbation), you might try just taking a small break when the fantasy bothers you, as much as you need so that you're not feeling disturbed any more. I'd also suggest trying a Mindfulness approach - I'm guessing that when the fantasy comes to you, you're trying to mentally fight it off? By thinking about what would happen if your partner knew, you're ending up focusing on the fantasy even more, without meaning to. Instead, try to accept that the thought is there. Step back a little and notice that it's there; remember that it can't do anything by itself because it's a thought, and thoughts don't do anything. There's no need to do anyting about it, no need to worry about any "what-ifs" - it's simply a thought which is there. If worry about the "what-ifs" comes up, treat that in the same way: they are simply thoughts which have come into your mind. Thoughts will pass, and other thoughts will come, and go.
It's hard to deliberately not think about something. If I say "don't think about the three-trunked purple-striped elephant"... I pretty much guarantee you weren't before but you are now! Try to make my three-trunked purple-striped elephant go away. Go away, three-trunked purple-striped elephant. Not gone yet? Well, no!
But if I let my elephant wander around for a while as I do other things, think of other things, it will fade, and I will forget that I wanted to forget it, and it will fade more. And if it wanders back again in the future, I will know I can just leave it to walk around and fade, so I'm not so worried about being stuck with it in the future.
Does that make some sense to you and feel like it might be helpful?