Hi. Headache, sleeplessness, remaining preoccupied with thoughts are symptoms suggestive of underlying depression. However, more details would be needed to reach a definitive diagnosis. You should consult a psychiatrist to get yourself evaluated completely. Accordingly treatment can be initiated.
Next Steps
Seek a psychiatric consultation.
Health Tips
Start exercising daily. Talk to someone close to vent your feelings.