Well, for your situation, it will be very dangerous. So in my opinion, you need to try some ways to treat it as soon as possible. For example, you may take some warm cloth on your eyes and do a warm compress on your eyes. In that way, it can relieve the symptom. Also, just go and see the eye doctor quickly. And he can give some eye exam, or it will just lead to some serious problems. Also, wearing eye patch can be effective. By wearing an eye patch, it can be bothersome, but it can just protect your eyes.
You can place a piece of ice on your closed eyebrows to calm down your pain. You can move the ice from the left side to the right side. The cold water in your eyes will lubricate your eyes. You can wash your hands with soaps and then open your eyes in front of a mirror to check whether there is a stye in the your eyes for a stye can cause sharp pain too. If you have a stye, you may need to see an eye doctor for some medical treatment. Hope you good luck!
Perhaps you have overused your eyes and strained the muscles of your eye corner. You should do some eye exercises and have a good rest after a certain time of work. Also you can apply hot compresses alternate with cold compresses over your eyes for ten to fifteen minutes to relieve the pain. Massage your eyes also can alleviate the pain. Bear in mind that you should not read or work in the dim place, which can make eyes liable to fatigue and do harm to eyes and do not spend too much time in watching TV or playing computer games in case of eye strain. Do not rub your eyes with your hands, which can convey many bacteria to the eyes.
Eye pain can be caused by many reasons. I think you should find out the reasons and then treat your eyes with appropriate ways. Sometimes I will suffer from eye pains in the corner of my eyes because I used to use computer for a long time. Maybe my eyes are very tired. The muscles around our eyes need to be relaxed. I often apply some artificial tears to moisten my eyes at this moment and move my eyeballs for few minutes then the symptom will disappear on its own without notice.
You may have a corneal abrasion. If you weat contacts, the contacts in your eyes may cause a corneal abrasion if you rub your eyes without evern notice that. But it will heal on its own very soon and don't need any special treatment. You can just apply some artificial tears to relieve it. And you may need to give up contacts for few days. And your fingernail may hurt your eyes too. So that's why we must cut our fingernail. Or sometimes when we move our head or neck too much we may suffer from a slight eye pain. But it will not persist for a long time.