Chili in the eyes just like the hot sauce in the eyes. It is very spicy and is very irritating to your eyes. It can cause eye tears and make your eye keeping blinking, which is very uncomfortable.
The best way I suggest is to sink your eyes in cool water. Let the water come into and out of your eyes. At the same time, keep blinking your eyes, so that the chili can be extruded out of the eyes along with the water. Just keeping doing this, your eyes will become better and better. But if your eyes still hurt after doing this, you may get some inflammation, go to see the doctor immediately.
You can keep washing your eyes with milk, but not water. Because milk binds to the capsaicin molecules in the chili and helps wash it away. Otherwise, it would irritate your eyes worse and make your eyes to be damaged. The best way is you should lean your head over the sink and slowly pour milk into your eyes. You can ask someone else to help you if it is possible.
I believe the feeling must be terrible, and what I recommend to you right now is to use plenty of salty water to flush your eyes to relieve the feeling. Afterwards, you need to get some eye drops which could help to disinfect the bacteria. Remember, do not attempt to rub your eyes. And generally speaking, one or two days later your eyes will be fine.