You need to connect the capacitor(s) directly across the motor voltage supply to the servo drivers. Without knowing the characteristics of the servo motors it's not possible to say how much capacitance is needed. If you are getting the problem when you are driving just one servo, then I think you will need at least 1000uF 35V or more.