A leading Sunni Muslim scholar opposed to the Taliban, Mr Naeemi was known for his outspoken views against suicide bombings and militancy.
He was one of the few scholars who had openly supported the ongoing military operation in Swat and had labelled the activities of the Taliban "un-Islamic".
Mr Zardari said: "We are fighting a war for our sovereignty. We will continue this war until the end, and we will win it at any cost."
The president paid tribute to the bravery of soldiers fighting what he called "this war on terrorism".
He said they would receive allowances equal to a month's pay immediately, while other soldiers would receive them next January, and other government officials would also see a rise in their salaries.
He promised that two million people displaced by the current offensive against the Taliban would be rehabilitated.
Government forces have made recent gains against the Taliban, but it is a battle for hearts and minds, too, the BBC's world affairs correspondent Mike Wooldridge says.
Sarfraz Naeemi was killed when the explosion struck the Jaamia Naeemia madrassa on Friday.
The aftermath of the blast that hit an Islamic religious school in Lahore
The other attack, in Nowshera, took place in a military high-security zone, close to an armed forces supply depot.
Taliban spokesman Maulvi Omar also told the AFP news agency it was responsible for the attack on the Pearl Continental Hotel in nearby Peshawar, the capital of North West Frontier Province, on Tuesday which killed 18 people.
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.