Thanks for posting your query.
I understand that you went for your regular scaling but ended up having bad headache. Sensitivity post scaling is normal , for some people it can be exaggerated and it varies person to person. But it usually comes down after a day or two. You can use anti sensitive toothpaste. But,
if your sensitivity or headache persists, it is better to see a dentist
There is a possibility that you have a cavity which became sensitive post scaling. Tooth maladies like abrasions, erosions [ notches on tooth due to improper brushing habit] can also cause sensitivity.A dentist will evaluate this and treat the cause.
Hope that answers your query.