If you are unlucky enough to be the victim of heat metal, you really only have one object. You need to find a way to break the enemy’s concentration on you. Hitting them with ranged or magic attacks can potentially break their concentration on the spell and save you from getting cooked, so try to weather the burning while your allies get into range. Additionally, some DM’s allow sufficiently powerful cold spells to be used to negate the effects of heat metal. Powerful spells like Ice Storm, Chill Metal, and protection from fire could be used to cool the character down, however, these are homebrewed solutions that need to be talked over with your DM. The spell can also be dispelled by powerful enough dispel magic castings, but that does require your dispeller to be prepared with the magic.