Moduli dependent non-holomorphic contributions of massive states to gravitational couplings and C2-terms in compactifications