The comparator you like can work to -0.2V on the inputs. (I think)
Here is a circuit I am using on a product.
Input on right side.
R600 limits the current if the input is too large. In your case you might want to change to 2200 or more.
D600 protects the IC.
R602, R603 adds Hysteresis. My IC has some and I wanted more.
The (-) input set the "slice point" which you want to be 0 volts.
I don't have time to think whats wrong with this circuit right now.
I am using this where "slice" is 0.5 to 2.5 volts. Some voltage comparators will work to -0.4 volts on the inputs so having "slice" at 0V should be fine. (look for common mode input voltage range)
If the input is above 0V the output will be at 5V. If the input is below 0v the output will be 0V.
View attachment 86800