hi fahime,
Sorry if my remarks about safety offended you, that was not my intention.
I am sure that when you give someone advice about a subject, you will feel
its your duty to caution them about the safety hazards. You understand,
I do not know your level of experience when I give you advice.
Anyway back to business.
As I understand, you want to generate +4 volts dc, with a current output
maximum of 100mA from a 220v 50hZ mains supply.
Your idea of a bridge rectifier and smoothing capacitor are fine, but if you
require a regulated +4V, you need a voltage regulator. I would suggest
a LM317K the 1 amp version, this an adjustable voltage regulator from about
0v thru +25volts. Get the datasheet and example circuits.
The problem is most voltage regulators require their input voltage, [ from the bridge] to be at least +3 volts higher than the output voltage.
So for a +4volts regulated output from the LM317 you will require at least 7volts input from your bridge. This means that your transformer needs to
be at least 9v ac. If you cannot get a 9v transformer [its a standard voltage]
you can use a 12v transformer. A transformer rated at 6VA will be more than enough for your project.
Regards
EricG