A finite element formulation for thermoelastic damping analysis