Construction machine equipped with a capacitor