  We prove some polynomial identities from which we deduce congruences modulo
$p^2$ for the Fermat quotient $\frac{2^p-2}{p}$ for any odd prime $p$
(Proposition 1 and Theorem 1). These congruences are simpler than the one
obtained by Jothilingam in 1985 which involves listing quadratic residues in
some order. On the way, we also observe some more congruences for the Fermat
quotient that generalize Eisenstein's classical congruence. Using such
polynomial identities, we obtain some sums involving harmonic numbers. We also
prove formulae for binomial sums of harmonic numbers of higher order.
