Goodluck Jonathan said it had been not just an attack on Nigeria, but an attack on the international community.
The radical Islamist group, Boko Haram, told the BBC it was behind the blast in the capital, which left at least 23 people dead and 81 wounded.
Mr Jonathan said the group was a "local problem" that had to be dealt with.
Boko Haram, which is fighting for the establishment of Sharia law in Nigeria, is alleged to have had contacts with al-Qaeda in the Islamic Maghreb, which operates in North Africa, and al-Shabab in Somalia.
The BBC's Mark Doyle in Abuja says Friday's suicide attack shows Boko Haram, whose name roughly translates as "Western education is forbidden", is getting bolder and that Nigeria has a growing security crisis.
For two years, the Islamist group has been targeting government and mounting a campaign of killings, but attacking the United Nations in the heart of the capital is a major escalation, our correspondent adds.
The bomber drove his vehicle through the headquarters' two security barriers, then crashed into the reception area before detonating the explosives.
The blast was powerful enough to bring down parts of the structure, where about 400 UN personnel work, and blow out the windows of nearby buildings.
Standing among the broken glass and twisted metal on Saturday, President Jonathan told reporters: "I and all Nigerians are shocked."
"Terrorist attacks on any individual or part of the world is a terrorist attack on the rest of the world," he added. "Terrorists don't care about who is anywhere."
"We will work with the UN and other world leaders to ensure that terrorism is brought under control."
When asked by the BBC what he would do about Boko Haram, he gave no direct answer but acknowledged it posed a threat.
"Boko Haram is a local group linked up with terrorist activities and as a government, we are working on it and we will bring it under control."
Our correspondent says Nigeria's government has tried negotiating with Boko Haram and cracking down hard, but neither tactic has worked.
UN Secretary General Ban Ki-moon said on Friday that he condemned "this terrible act utterly", and sent Deputy Secretary General Asha-Rose Migiro and Under-Secretary General for Security Greg Starr to Nigeria.
On Saturday, the UN's top official in Nigeria said nine of its staff were confirmed dead and that dozens were being treated in hospital.
"We have lost motivated, bright, selfless people who were working only for the good of Nigeria and the world," said Agathe Lawson, the UN's acting resident co-ordinator.
"Our priority now is to ensure those who are injured and the families of those who died are cared for."
Mr Lawson said that her "second and urgent priority" was to ensure that UN operations continued in Africa's most populous nation.
"We will not be deterred in our mission to work to improve the lives of Nigerians. This is why we are here," she added.
Shortly after President Jonathan left the bomb site, agents from the US Federal Bureau of Investigation (FBI) arrived to help investigate.
"The FBI is on the ground at the request of the Nigerian government," said US embassy spokeswoman Deborah MacLean without elaborating.
Nigeria's president has promised to bring terrorism under control, during a visit to the scene of Friday's bombing at the UN's headquarters in Abuja.