How to find the right smoothing capacitor for rectification circuit
Since the LM2596 is a switching regulator, the input current will be much lower than the output current. Assuming a minimum of 24VDC input and 83% efficiency the input current for 2A output at 5V would be 2/(24/5)*1/0.83 = 0.5A. Using your formula the required capacitance is then 0.5*8.3*1000 = 4,150uF.

If more ripple is acceptable then a smaller capacitance would be sufficient. You have around 10V of 'headroom' before the voltage drops below 24V, and even more before it gets close to the regulator's dropout voltage. For 10V ripple you only need ~415uF according to the formula.

However there is another reason for using higher capacitance - mains 'brownouts' and dropouts. Even though it might work OK with as much as 20V ripple under normal circumstances, a few low voltage or missing mains cycles could allow the capacitor voltage to drop too low, causing mysterious glitches in the device being powered. Higher capacitance holds the voltage up for longer to smooth over any momentary drops in the mains voltage.