What do you do if you accidentally scratch your eye?

Pain relief. Corneal abrasions can be very painful, depending on the severity of the scratch. Infections are also a concern. Try to keep the eyelid closed as much as possible and use otc pain meds. If there is no improvement within 24hrs. Or if there is a goopy discharge, see your physician or ophthalmologist for definitive care.
Corneal abrasion. Can use refresh pm, systane ointment, or genteal gel applied to inside of lower lid can help healing 4x day or more until seen by ophthalmologist.