Gauge Invariant Derivation of Zeroth and First Laws of Black Hole Thermodynamics