There is pus in my tooth. And also have severe headache. Can these two be interrelated?

Yes. Please go see a dentist. An infected tooth can cause headache, with risk of sinus problems.
Toothache & Headache. Any toth related problems can cause headaches. If you have pus in or around your tooth you need antibiotics to clear it up and then have the tooth removed or have a root canal to prevent re-infection.
Yes. Don't exactly understand how you can see pus inside your tooth. But yes, dental infections often cause headaches. Go visit a competent dentist for treatment.