If you are being asked for the first time, you can say, I will be happy to do that for you.
Can you do what I have asked, or is that something you do not want to do?--- I will be happy to take care of that for you.
After you have agreed to do something, then you can say, "I'm happy to do it." You have agreed already, so now you can say it makes you happy:
Thank you for doing this for me. --- I'm happy to do it.
After it is done, If you are then thanked, you can say - It was my pleasure.
Thank you doing that. --- It was my pleasure.