Could you please proofread my written work?
I have a headache and pain in my eyes because I was looking at the computer screen for a long time while I worked.
I should've rested my eyes.
Stylistically, your use of two present participles is not good, even though it is not an error. The participles act as adjectives, not verbs. Because of this, your sentence has no interesting verbs. Your only active verbs (verbs that have a subject) are "have" and "was". Those verbs say nothing of importance. To turn your sentence into a good one, you should change one of your adjectives into a verb: either change "I was looking" into "I looked" or change "while working" into "while I worked".
Usually, the most important word in an English sentence is the main verb, and it needs to have a subject. The canonical form of the English sentence, the one that should be used most often, is SUBJECT + VERB, and the verb should say something useful.