Resistor & capacitor are getting too hot
THIS CIRCUIT WILL KILL YOU
Or your family
Or your friends  

The capacitor MUST be X  or Y rated for AC mains use.
If it is getting hot you are using the wrong cap.   

Regardless of what formulae and calculations say, if the resistor is getting too hot you must use a larger wattage one or cool it better.

The same applies to the zener diode.  

This circuit is suitable (if ever) only for applications where nobody can EVER touch ANY part of the circuit when operating.   

The cost savings are so small compared to using a commercial supply that the  only application that may make sense is in a high volume product where it is properly designed for the task and the limitations are properly understood and allowed for.    

THIS CIRCUIT WILL KILL YOU
ALL parts of the circuit MUST be considered always "live" - ie at full mains voltage.
Some parts are, others can be at any moment if something fails.