Butter, perhaps?
I would first suggest deciding what time period we're talking about, and therefore which helmet. A 13th-century great helm will vary vastly from a 14th century bascinet which will differ a lot from a 15th century armet. In general, however, it's unlikely that this would happen to begin with. Because of liners and helmet suspensions your head should never be touching the helmet. Instead, the helmet should float on leathers and padded liners. If the metal of the helmet is touching your skin, it's far too small or poorly adjusted. The flotation gives additional space to mitigate the impact of a weapon.
Now onto the question proper, it is very difficult to dent a helmet such that the wearer would be stuck inside and still alive. Your best bet would likely be the armet or a closed helm (while distinction in late Medieval and through Renaissance was never really made, we generally say that armets open sideways while close helmets open forwards). A strike to the chin could shatter the wearer's jaw without killing them, and dent the helmet sufficiently to make taking it off impossible... except for the design of both of these helmets. An armet, as discussed, opens sideways like this. A close helmet opens forward along the hinges of the visor.
Furthermore, bending steel isn't very easy, and helmets and breastplates would be by far the thickest parts of armour. Of course, thicknesses varied drastically across even the same piece, since they didn't use rolled sheet metal to make armour like most armourers do nowadays. Medieval armours tended to be thinner, but you're still talking about, for example, National Museums of Scotland A1905 being 0.6-1.3mm thick at the front. Musée de Valare MV30 is between 1.2 and 2mm, and the fairly famous Royal Armouries IV.467 is between 1 and 1.8mm (all of this data is from the Facebook page XIV Century European Armour. They have a PDF with all known extant 14th century armours. I seriously recommend it to anyone who likes armour). Admittedly, some of these are relatively thin, but not enough to be easily dented without seriously injuring the person underneath.
Hope that's enough for the gods of r/AH