I feel guilty....

I have a friend who is the opposite gender from me. Every time I end up getting an urge I think about them as a way to stop the urge because I would never want them to see what disgusting things I do. Just to be clear, neither of us have any romantic feelings towards each other, we're just good friends. But everytime I use them as a way to shut my ideas down... I feel guilty as if I brought them into a problem that they, a good person should never have to be brought into. Should I really feel this guilty?

Normally I'd look at a picture of them or a memory or text to get the idea of porn out of my head and it almost always works. They are essentially my motivation, but it doesn't feel right to do this without them knowing. I never want them to know as they are valuable to me and a good person in general. They stood up for me and have helped me through tough times and I never want them to see this side of me I'm trying to erase, how do I go about doing things?