These things nearly always wind up being trade-offs. You pay for what you need at the expense of other things. It is not possible to make a ship that will survive arbitrarily much enemy fire.
You only have a finite ability to pack what amounts to armour. Passive protection of any kind gets categorized as armour. Unless the now-heated chemical can be used as a weapon of some kind. There are SF devices that get charged up by enemy weapons, providing the energy the attacked ship requires to fire its own weapons. But put that aside for now.
Some parts of your ship will be more sensitive to temperature change. So you give them the most protection. That would require a detailed analysis based on data from ships that survived battle.
The analysis has to be correct. If a ship gets shot up and comes home, then the parts that got shot away are the parts it can live without. Those are the parts that do NOT need more protection. If the captain's cup holder gets shot away the ship probably still comes home. If the engines get shot up probably it does not come home. So the repair yards will repair the captain's cup holder a lot more often than they will replace shot-up engines.
So you pack the parts that do need protection, the engines, with extra protection. And you tell the captain "Suck it up!" when he complains about his cup holder.
Two basic patterns will apply: ablative and absorptive.
Absorptive means it takes the shot and recovers. Probably it will reject the heat using some sort of radiators. So you would need heat pumps of some kind. Maybe the chemical you use has the ability to change states if you compress it, for example. So later, after the battle, you can rest up and cool off. This is probably appropriate for larger ships that have room for lots of equipment to perform these tasks. Possibly the radiators are stowed until needed. Possibly they are inconvenient when they are extended, maybe interferring with maneuvers. Maybe they can be jetisoned in an emergency. That means the ship is severely hampered at cooling off.
Ablative means you lose some of the chemical each time you get hit. The chemical is ejected and takes the heat with it. So you need a new supply of the chemical to recover. This is a "trope" in science fiction. You can easily find this by googling. Usually it involves a layer of some material that boils away when it gets hit by an energy weapon. This carries away the energy. And some forms provide a temporary cloud of material that obscures the area. The cloud may or may not absorb additional weapon fire while it lasts, or it may just give obscurring cover. Ablative is probably for smaller fighter type ships that cannot afford the extra equipment.