OP,
Use low expansion foam. That said, it will most likely not provide any benefit and certainly will not help with insulation in a very small area. If your intention is to add the foam as a suitable base for the repair... consider just using this stuff:
Solarez for the fiberglass repair.
I have used Solarez on my fiberglass sided trailer, as well as surfboard repair. Stuff works great, is long lasting and can fill voids. You do not need to mix resin/catalyst as this product uses the sun for activation. It really is a great product and can be found locally in surf shops where you live. I keep a tube of it in my TT just in case.