How to emulate an analog potentiometer with PWM
Adding to Ricardo's answer:

PWM can do the job, sort of. You need a low pass filter (LPF) to convert the PWM to an analog voltage and an amplifier to take it from 0-5 to 0-10V. Or you can get a dedicated digital-to-analog (DAC) chip but that will obviously be more expensive than a resistor and capacitor for the LPF.

Here's some tutorials on converting your PWM to an analog voltage:

Analog-Output: How-To
Arduino’s AnalogWrite – Converting PWM to a Voltage

Then you need to basically double the voltage. You do that with an operational amplifier. The resistors you pick for the op amp set its "gain", in this case you want it to be 2 so you can go from ~5v (max output) to 10v.

Here's an example of that: My First OP-AMP Circuit