Solid state foaming of epoxy resin