Polyurethane / gorilla glue works well straight onto Divinycell foam. I've used it frequently. Epoxy I would mix in some micro balloons or fumed silica to make it mayonnaise consistency and prevent it just soaking into foam.
Always do a little test piece first.
I agree with TomW.
I have tried both methods so my 2c follows.
The epoxy one creates a tough line along the join. It was more difficult to sand along with the foam evenly and also showed the glued resin line once the board was glassed. Maybe could have used more micro for the glue mix.
The foaming polyUrethane bonded the pieces extremely well and sanded easily and showed no glued line once glassed.
Both resulted in no issues even after extended use.
Just my experience.