Not quite: the capacitor would be dropping very nearly 240V. The voltages add vectorially -- well, assuming the LED acts as a resistor, which really isn't the case (and by the way, you need to use two LEDs back-to-back, or a full-wave rectifier, otherwise the LED will be destroyed

). When the voltages are at 90 degree phase to each other (as is reasonably the case here),

\$ V_{in} = \sqrt{V_{cap}^2 + V_{load}^2} \$

Another catch is that, although a capacitor will do a fine job under steady-state AC conditions, the real world is not steady. Most important of all: when you close a switch, the voltage very quickly (very quickly indeed, even for electronics: within fractions of a nanosecond, sometimes!) rises, which means using the other (more general) capacitor equation,

\$ I = C \frac{dV}{dt} \$

the dV is, potentially, as high as the peak line voltage (~340V), and dt is potentially nanoseconds. Clearly, the current could be monstrously high!

The solution is to add a current-limiting resistor in series with the capacitor, so that not all the voltage is dropped by the capacitor alone. This reduces efficiency (the resistor dissipates power, whereas the capacitor draws reactive current only), but limits the peak current to safe levels.

Tim