The trick is distracting yourself or actually help that someone you denied. There's no other way around it unless you habitually do it to the point you feel no guilt.
1. Do that person another favor to make up for the last one.
2. Do a favor for someone else out of pure volunteerism.
3. Make a promise that when the next situation like that ever comes up, you would not turn them down and follow through that promise.
4. Rationalize that by denying that person help, you did the right thing. For example, by denying them money you know they would use for gambling, you get their hate but you did the right thing because you did not consent to their vice. Focus on the positive sides of not helping. I don't recommend doing this often as it is situational.
5. Find other sources of distraction. Like solve someone else's problems. The way I understand the question is that you found guilt when you didn't do what they expected you to do. Maybe reevaluated what expectations they have for you and compare it to your expectations as well.
I wouldn't lose any sleep over it. You must have had your reasons for not helping in the first place. i have felt like this before but you can't help everyone all the time. I spend more time helping others and if I think back it is a little one sided.
if you feel that bad then do something that comes from you. Just go and do something special which means something. it could be taking them out to dinner or something like that. Show them you are sorry by doing something small.
If it bugs you that much then just do it. You could wait for the net opportunity but sometimes they don't come around. I would suggest being proactive and fix things.
First of all, stop and wear yourself out about that. That is of no use for anybody. You might have had a reason for not helping that person maybe. I do not know the circumstances. But really...let bygones be bygones :)