Gauge dependence identities and their application at finite temperature