There might be an easier way to do this but I couldn't find it and it took me forever to work this out so I hope that it helps someone else as well.
Using the excellent and free Paint.Net image editing software I wanted to erase an area but I wanted to do it with the paint bucket so that it would would erase all the complicated edges that I couldn't get to.
Start off by selecting a small area that you're going to erase with the Rectangle Select tool and hitting the delete key. You now have a small checkered section.
Select the Color Picker tool and click in the just deleted area and this will set your color to transparent (deleted/erased).
Now click on the Paint Bucket tool and click in the area(s) that you want to erase with this tool and it will use the Paint Bucket to erase the area(s).
Please let me know if there's an easier way to do this.