Generally I'd stick with the first one unless the request or interruption has already passed.
I'd frequently say: "Sorry for bothering you but..." or "Excuse me for bothering you but..." and then state whatever question or interruption I'm posing the person.
On the other hand, if I interrupted someone and they were unable to help e.g. "Do you know where the ATM is?" "No, sorry." "Oh, okay, sorry for having bothered you."
However even in the case that the request has passed, you can still use the first one. It would have also been acceptable to say "Oh, okay, sorry for bothering you." in this case as well (since, presumably your continued conversation which was an interruption is still a bother).
I'd probably stick to sentence #1 unless the failed request was of considerable duration (maybe they tried to help for a few minutes but were unsuccessful?)