For the dual pair Sp(n)×O(m) with m≤n, we prove an identity between a special value of a certain Eisenstein series and the regularized integral of a theta function. The proof uses the functional equation of the Eisenstein series and the regularized Siegel–Weil formula for Sp(n)×O(2n+2−m). Analogous results for unitary and orthogonal groups are included.