How do I change the icon of the close tab button on Gedit in a custom distro with LXDE and icewm as window manager? Do you know where it resides or how I can change it? Now, it looks like this:

Change your theme, and you change the recurring objects on your screen, such as close buttons. UbuntuThemes provides, free, a vast number of themes, and you can deconstruct them to see which elements come from where for custom themes, and more theme change information is available on this board at at Ubuntu directly.
To summarize the steps:
cd ~ & ls -al from a terminal window.Not a solution but this might give you a clue about what to search for:
http://www.micahcarrick.com/gtk-notebook-tabs-with-close-button.html
So it seems to be defined by the gtk theme, and the button image must be somewhere in the specific theme folder.