Referring to recent contact with the Taliban, Sharif told a special meeting of the federal cabinet on Monday evening that two-way communications had started and "the ice was melting" between the government and the militants.
"Amidst this scenario, the drone strike inflicted serious damage to the government’s efforts for dialogue and peace. But we hope to put the derailed peace process back on track," he said.
Without naming the US, Sharif said Pakistan will not allow anyone to derail the peace process. "We will not let the efforts for dialogue and peace be derailed," he said.
Sharif added that if the peace process cannot be supported, "then at least it should not be harmed".
"The continuity of the deplorable and condemnable drone attacks shows that Pakistan's point of view about lasting peace and ending terrorism has not been properly understood. We should be allowed to solve our problems according to our own strategy," he was quoted as saying in an official statement.
Mehsud was killed with several other militants when a Central Intelligence Agency-operated spy plane targeted a compound in the lawless North Waziristan tribal region on Friday. His death occurred hours before a team representing the government was to meet with the Taliban regarding the talks process.
Sharif stressed that the government, military and all political parties want to resolve the issue of terrorism through dialogue.
"Pakistan is an independent and sovereign state. We are free to make decisions," he said.
Earlier in the day, while making his first public remarks after the killing of Mehsud, Sharif said the US drone campaign violates the sovereignty of Pakistan, which will not allow its national security policies to be determined by foreign powers.
Without referring to the killing of the Taliban chief, he said US drone strikes also violate international laws and are counter-productive to efforts to bring peace and stability to Pakistan and the region.
“Gone are the days when our national security policies were determined through telephone calls from abroad. We now have a democratically elected government, chosen by the people of Pakistan," Sharif said in his address at a field exercise by the army in Punjab province.
"Pakistan is faced with serious challenges both within the country and at an international level. But there is hope, a hope to rise through and meet these challenges," he told a gathering that included top military officers and army chief General Ashfaq Parvez Kayani.
Sharif said his government is determined to end the ongoing bloodshed and violence "but it cannot be done overnight, nor can it be done by unleashing senseless force against our citizens, without first making every effort to bring the misguided and confused elements of society back to the mainstream"
After the Cabinet meeting, Sharif also said given the Pakistani peoples' "resolve and sacrifices" in the war against terrorism, "it is incumbent upon the international community to support this endeavour of the government for the accomplishment of peace."
The Cabinet meeting reiterated the government's stance that the drone attacks are simply unacceptable, they are a violation of Pakistan's territorial integrity and that diplomatic efforts will be continued to stop these attacks.
Sharif said the recently-held All Parties Conference had clearly demonstrated that Pakistan's political and military leadership, including its people, media and civil society, want to resolve the problem of terrorism through serious and meaningful dialogue.
"The entire international community is also desirous of putting an end to this mayhem of terrorism. Pakistan has paid the heaviest price in this war in the form of blood. We fully realise the enormity of this issue and we must be allowed to resolve our problems through our own strategy," he said.
The prime minister stressed that by leaving the path of eradicating terrorism by means of blood, a dialogue process has been initiated by the government which should at least not be harmed if that cannot be helped.
It is Pakistan's right to decide its issues based on its national interests, he said.
The prime minister directed Interior Minister Chaudhry Nisar Ali Khan to report to him after assessing the situation that has developed in the wake of the recent drone attack.
Taliban vows to avenge Hakimullah's killing
How Hakimullah Mehsud became a dreaded jihadi
Pak Taliban threatens to target Nawaz's party leaders
Meet Sajna, the new leader of Pakistan Taliban
25 BIGGEST car manufacturers in the world