If the 'over thinking' and sleep problems have started recently, or after some major life stress, then it's advisable to visit a mental health professional and start therapy with or without medications.
For your headache, you need to be more specific about the type of headache, the exact location, time of day when it starts and stops, how long it lasts, which situations or things increase/decrease the headache, etc.
The rule of thumb is, if it's "severe", it's best to visit a doctor and get the necessary tests done.
Next Steps
Visit a mental health professional, and then possibly a physician if the headache is unrelated to the thoughts and sleep disturbance.