This is an ongoing question in contemporary protestant theology. However, it has already been answered. I knew for instance that Thomas Aquinas and John Damascene had already answered the question by appealing to the distinction between the divine and the human
persons natures. The human nature suffers, the divine one does not, being impassible. Today, however, I was reading some old skool conciliar decisions and came across this little gem:
Si quis dixerit, quod in passione crucis dolorem sentiebat Deus, et non caro cum anima, quam induerat–forma servi, quam sibi acceperat, sicut ait Scriptura–Filius Dei Christus: non recte sentit.
Which, being translated, is:
If someone were to say that in the passion of the cross God felt pain and not the flesh with the soul, which he had put on–the form of a slave, which he himself had taken, as the Scriptures say: he does not think correctly.
This comes from Pope St. Damasius I (366-384) and it records the decisions of the Council of Rome (382). The reference is to Denzinger (1937), #72. It is also worth noting that the decision only says that this is an error, not outright heresy, since every other mistaken proposition about Christ in the list is anathematized. This one is just wrong.