what you need is a referred to an an 'online' UPS.
Voltage and Frequency Independent.
These work by taking in the AC voltage, putting it through a rectifier to convert to DC, then the DC is put through an inverter to produce AC output.
You then get a perfect sine wave output, with selectable frequency.
(that's the most basic way of describing an online UPS)
Not all manufacturers UPS can operate as a frequency converter so make sure before you buy!
Also, as said above, don't switch over to a bypass line as this then would put through the raw mains voltage and frequency.
The UPS units that i sell will know that it's operating in frequency conversion mode and will not automatically switch over to bypass (in the case of a UPS fault etc) but you can still manually switch it, so just remember not to
Hope this helps.