Short, stabbing, extremely intense headaches that can be absolutely terrifying, lasting between five and 30 seconds, occurring in or behind the ear, are known as ice pick headaches.
Headache experienced as electric shooting pains can be due to a nerve injury.
Facial neuralgia can be manifested with very intense pain spreading to the occipital area, or behind the ear.
Cluster headache and cervical spondylosis, could be taken into consideration, too.
Best wishes!
Marija