Europe usually imports about 40pc of its gas and 30pc of its oil from Russia.
The speech came as Ukrainian President Volodymyr Zelensky reported "good news" from the front near Kharkiv in the east, saying some settlements had been recaptured as both sides reported heavy fighting in the region.
Ukrainian and pro-Russian officials said there was fighting around the town of Balakleiia about 60 km (38 miles) southeast of Kharkiv, with unconfirmed reports of heavy losses to Russian forces.
An explosion at a power plant near Odesa in the south, meanwhile, cut electricity supplies to 360,000 people, a spokesperson for the regional administration said.
Putin said in a speech on Wednesday to an economic forum in Russia's Far East that Russia would not lose what he calls its "special military operation" in Ukraine.
He threatened to halt all supplies of energy to Europe if Brussels went ahead with its proposed price cap on Russian gas, the latest Western step to deprive the Kremlin of funds to finance the war.
"We will not supply gas, oil, coal, heating oil - we will not supply anything" if that occurs, he said. Europe usually imports about 40pc of its gas and 30pc of its oil from Russia.
The United States and France says Moscow is already using energy as a "weapon" to weaken Europe's opposition to its invasion, with the main conduit for Russian gas into Europe, Nord Stream 1, shut for maintenance.
Ukraine remained guarded about its counter-offensive in the east but presidential adviser Oleksiy Arestovych, in a video posted on YouTube, said Ukrainian troops had surprised Russian defenders at Balakleiia.
"The Russians are saying that Balakleiia is encircled when in fact (our troops) have gone much further ... they've cut off the road to Kupiansk," he said, referring to the main transport hub supplying Russian forces in Izyum to the east.
A pro-Russian official from the region, Rodion Miroshnik, said on Telegram that Balakleiia remained in Russian hands although there was fighting north of the town.
Reuters was unable to verify the battlefield accounts but Yuri Podolyak, a Ukrainian often quoted by pro-Russian officials, also said Russian troops were surprised by the Ukrainian advance.
"The enemy had considerable success near Balakleiia with a relatively small force ... It would appear that Russian forces slept through this advance and were expecting it elsewhere," he wrote on Telegram.
"Everything would seem to depend now on the speed with which reserves are brought into the fight ... there have been significant losses."
Asked about the war's progress at the forum in Vladivostok, Putin said: "We have not lost anything and will not lose anything."
The United States accused Moscow of war crimes by unlawfully detaining, interrogating and deporting up to 1.6 million Ukrainians, including 1,800 children.
US ambassador to the United Nations, Linda Thomas-Greenfield, told the UN Security Council that Russian officials are overseeing so-called filtration operations that "aim to identify individuals Russia deems insufficiently compliant or compatible to its control".
The envoy said the practice was preparation for annexing territory.
UN political affairs chief Rosemary DiCarlo said the council had verified that Ukrainian civilians were subjected to filtration and demanded access to all detained people.
Russia's UN Ambassador Vassily Nebenzia said Ukrainians who travel to Russia "go through a registration rather than filtration procedure."