The specific heat changes based on the actual temperature. How do I calculate the thermodynamic equilibrium when this value changes?

I have 2 substances with huge differences in temperature, with the specific heat of one starting at 0.6 J/kgC and ending at about 2.8 J/kgC. It goes from -200°C to 0°C. With this huge difference in specific heat, how can I calculate the thermal equilibrium with another substance? All I know is a formula for the fixed specific heat, because that usually doesn't change as much. But is there a formula for it changing as much as it does?

Instead of using $$C(T_f-T_i)$$ you use $$\int_{T_i}^{T_f}{C(T)dT}$$ To find the final temperature, this might then require you to solve a non-linear algebraic equation.