The mission that rescued an American citizen "was characteristic of the extraordinary courage, skill and patriotism that our troops" show every day, Obama said.
"Tragically, we lost one of our special operators in this effort. Our thoughts and prayers go out to his family, just as we must always honor our troops and military families," he said in a statement.
Panetta also commended the US Special Operations team who rescued American citizen captured by the Taliban in Afghanistan.
"I was deeply saddened to learn that a US service member was killed in the operation, and I also want to extend my condolences to his family, teammates and friends.
The special operators who conducted this raid knew they were putting their lives on the line to free a fellow American from the enemy's grip," Panetta said in a separate statement.
The Special forces member was part of SEAL Team Six, the group that killed Osama bin Laden in Pakistan's Abbottabad. He was part of a raid that rescued the doctor abducted by Taliban and held in eastern Afghanistan, NATO-led forces said in a statement.
Dr Dilip Joseph from Colorado Springs was abducted on Wednesday in Sarobi district of Kabul province. He and two other doctors were working for US-based NGO Morning Star.
US General John Allen, commander of NATO-led forces in Afghanistan, said he ordered the commando mission when intelligence showed that Joseph was "in imminent danger of injury or death."
"Today's mission exemplifies our unwavering commitment to defeating the Taliban. I'm proud of the American and Afghan forces that planned, rehearsed and successfully conducted this operation. Thanks to them, Dr Joseph will soon be rejoining his family and loved ones."