Your headache is likely to be related to the nature of your work. Here are some of the things which can help you:
1. Take short breaks after every 30 to 40 minutes of work. Stare at a distant object so that your eyes get some relaxation after looking at computer screen continuosly.
2. Also, get up from your seat and move around during the breaks to relax the muscles of your body.
3. Do not compromise on sleep hours (minimum of 7-8 hours/day)
4. Do not skip meals. Have food regularly at the same time everyday.
5. Do deep breathing exercises or yoga
(if you know) on a daily basis.
6. Include atleast 30 min of physical activity in your daily schedule.
All these require you to manage your time efficiently. If the problem persists, then consult a psychiatrist
who can help you overcome your problem.