Pairing LED with a Proper Resistor
The resistance of a led is dependent on the current through it... its a diode!
In the specifications there will be a figure for the forward voltage of the led at a certain current... What you need to do is find what current gives the best light from the led, use the forward voltage which in your case sounds like 3 volts and then calculate the resistor needed to drop 240 volts (actually 237 volts) at that current...
Say you wanted 10 mA of current, the resistor would need to be 240/10 kohm = 24 kohm.
Now you must throw the led you were using away as you have put it across the 240 volts ac and it has suffered reverse breakdown about 50 times every second you had it lit! So it won't be in the best of health...
Put a new led with a diode in parallel with the resistor in series of say 24 k or 50k which ever gives the best illumination...
Now the resistor will have 10 mA flowing through it so with 240 volts across it it going to have to dissipate the waste power... which is....
I x V = 10 x 240 mW = 2.4 Watts!! So use a big one that's rated for high voltage use above 400 volts...
A very wasteful way to power a led!