If you're trying to do torque control, then you'll probably get best results if you could work with joint accelerations, because:
$$
\tau = I \alpha \\
$$
Where $\tau$ is joint torque, $I$ is the moment of inertia, and $\alpha$ is the joint angular acceleration. It's a linear relationship and should be pretty straightforward to control with a PID controller.
You don't have an acceleration input for your joint, though. What you have is a speed input for your joint. SO, what you could do is to setup a PID controller with torque error as your input, joint acceleration reference as your output, and then perform a numeric integration of the output to get a speed reference. This would look like:
$$
\tau_{\mbox{err}} = \tau_{\mbox{ref}} - \tau_{\mbox{fbk}} \\
e_P = \tau_{\mbox{err}} \\
e_I = e_I + e_P*\Delta t \\
e_D = \frac{e_P - e_{P_{\mbox{prev}}}}{\Delta t} \\
e_{P_{\mbox{prev}}} = e_P \\
a_{\mbox{ref}} = (K_P e_P) + (K_I e_I) + (K_D e_D) \\
v_{\mbox{ref}} = v_{\mbox{ref}} + a_{\mbox{ref}} * \Delta t \\
$$