I know that OPAMP is a comparator.
No, it's a opamp. So it's ok to use it here.
As for schematic - V2 polarity is wrong. Swap its pins.
What is the formula for the output of the opamp system you showed so I could see where dod i go wrong?
Opamp with negative feedback will keep potentials of its input at the same value. Positive input has zero potential, so negative also will be zero.
By Kirchhoff's law currents through R1 and R2 are equal by module and has different signs.
So V1/R1 = Vout/R2
You can scale both R1 and R2 by the same value, it will change current from DAC and Opamp output to feedback circuit. Now it's 1 mA