The speech came as Ukrainian President Volodymyr Zelenskiy 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 reported fighting around Balakleiia, about 60 km southeast of Kharkiv, with unconfirmed claims of heavy losses to Russian forces.
An explosion at a power plant near Odesa in the south cut electricity supplies to 360,000 people, a spokesperson for the regional administration said.
Speaking at an economic forum in Russia's Far East region on Wednesday, Putin said Russia would not lose its war in Ukraine.
He threatened to halt all supplies of energy to Europe if Brussels capped the price of 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 40 per cent of its gas and 30 per cent of its oil from Russia.
The United States and France say 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.
EU energy ministers will discuss a price cap on Russian gas when they meet on Friday.
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.
A pro-Russian official, Rodion Miroshnik, said on Telegram Balakleiia remained in Russian hands although there was fighting north of the town.
Yuri Podolyak, a Ukrainian often quoted by pro-Russian officials, 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."
Russian forces fired rockets and heavy artillery into towns in several districts overnight, killing seven civilians, wounding others and damaging more than a dozen houses and buildings, local Ukrainian authorities said on Thursday.
Five people were hospitalised In Kharkiv region and seven were killed in Donetsk, regional officials said.
The US accused Moscow of war crimes by unlawfully detaining, interrogating and deporting up to 1.6 million Ukrainians, including 1800 children.
US ambassador to the United Nations, Linda Thomas-Greenfield, told the UN Security Council Russian officials are overseeing so-called filtration operations "to identify individuals Russia deems insufficiently compliant or compatible to its control".
Russia's UN Ambassador Vassily Nebenzia said Ukrainians who travel to Russia "go through a registration rather than filtration procedure".
The UN, aided by Turkey, brokered a landmark July 22 deal between Russia and Ukraine that restarted Kyiv's Black Sea exports of grain and fertiliser.
Putin said Russia and the developing world had been "cheated" by the deal and he wants it amended to make sure Ukrainian exports go to the world's poorest countries as intended.
Ukraine says around 2.37 million tonnes of food has already left its Black Sea ports, including 1.04 million tonnes for Asian countries and 470,000 tonnes for African states.