Sharp GP2Y0D810Z0F how to use?

A digital pin reads HIGH or LOW. That sensor seems to detect, or not, an edge. So, either there is an edge (HIGH) or there isn't (LOW) (the actual values may be the other way around).

An analog pin measure a range of voltages, such as those from a potentiometer, and outputs a value between 0 and 1023 that corresponds to where in the 0 to 5V range the measured value falls.