I think one of the key issues that you will face in winning this war/battle is if your own population does not fully support it. If your population is totally against losses from the military - I can only assume they are even more against civilian losses. The enemy is likely able to identify that your population maybe don't have the stomach for a bloody engagement. If they are in a no win scenario in a conventional sense they are likely to turn to asymmetric warfare/terrorism.
Unless you can rapidly prevent all citizens - civilian or otherwise - leaving the city and being able to travel globally. You may experience a home front terrorism issue. If you have been building up and preparing for years what has the enemy been doing? Sitting waiting? - doubtful. If they have any special forces troops etc they will probably be trained to blend into local populations. If you kill millions of peoples families you will radicalise huge numbers so you need to ensure containment. However if you can ensure containment then basically it is a perfect siege and 4 the million people will just starve to death.
Often this sort of resistance would take the form of civilian resistance in the city e.g. Maquis in WWII. However if they can't do that as there are no targets they would likely leave. Many soldiers left their own countries to form resistance units during WWII e.g. Czechs and Poles trained and armed in UK. They then returned to fight in their country e.g. Czech assassination of Reinhard Heydrich. Instead if if they can get into your country you have trouble - as they can form sleeper cells etc. and wait for the right chance. Depending on their cultura they may or may not be willing to launch suicide attacks but many would likely take huge risks to a carry out revenge attacks. Appropriate enemy culture may support suicide attacks as can be seen by Kamikaze attacks in WWII.
We don't have to look far to see how that works currently with groups like ISIS. ISIS encourage attacks from cities largely under siege but motivate people with their ideology to launch attacks against civilian populations in other countries. Terrorism against an already squeamish population would likely be highly effective.
Also are there elements of the enemy nationality as immigrants or even large number of 2nd generation immigrants within your country? Or even in nearby countries? America had Internment of Japanese Americans to deal with this threat during WWII.
Also do you fully control your own population? Are all elements of your own population fully committed to the cause? Depending on your tactics you may radicalise elements of your own population with no actual affiliation with the enemy. The risk would be media images of atrocities could sway your population against the action. This could increase the risk of homegrown domestic terrorism. Obviously propaganda works well here demonising the enemy - making them less than human. e.g. US Bug bunny cartoons of the Japanese used stereotyping to ensure the civilian population were more supportive.
So how do you win the battle for "hearts and minds"? Social media? Media blackout? I assume you can't enforce a media blackout and fully control the media otherwise the truth of your own causalities wouldn't matter? This may add another issue if the enemy is willing to stage fake atrocities to gain sympathy and generate support for their cause. Also look at political upheaval caused by anti Vietnam War protest in US in 60s. If the enemies only option is death - you probably can't win their "hearts and minds" so probably need to offer alternatives to prevent "Total war".
If the enemy is backed into a corner and conventional warfare won't work and surrender is not an option then they are likely to try these approaches.