And what was the mood in the Empire following these defeats?
I'll try to answer your question. Firstly, it should be noted that the Ottomans weren't unprepared for the Vienna campaign. They have mobilized around 90,000 men and is capable of supplying them with an abundance of food (Albert Caprara, Austrian envoy to the Sultan guessed that approximately 32,000 lbs of meat and 60,000 loaves were consumed daily) thanks to the advanced Ottoman menzil-hane supply network. That said, most historians now attributed the defeat in Vienna to Kara Mustafa's poor decisions and arrogance. For example, he disregarded the establishment of lines of contravallation that would defend the besiegers against a possible relieving force and he didn't brought his heavy artillery to the siege, which was pointed by his staff members and commanders. Even in the very last minute, he only redirected 28,000 men of his troops to face the 80,000 relieving force (Some historians now considered Ottoman troops facing the reinforced army must have reached 50,000 because of the arrival of Tatar forces). While he expected the attack to happen, he thought that the attack will be commenced on September 11 and ordered his men to stay awake throughout the night, exhausting them.
What followed is defeats caused by the anarchic high command and aftershocks of an unforeseen defeat. With the death of Kara Mustafa and purge or death of several commanders, the Ottomans lacked an effective operational and strategic leadership in addition of facing a multi-front war and demoralized army. The next Grand Vizier Sarı Süleyman Pasha proved to be a poor commander and lost several battles including near Mohacs where Suleyman had won years before which resulted in a mutiny. It should also be noted however, that the Ottoman army isn't all destroyed and is capable of inflicting several victories on their own despite the dire situation, like in Parkany (1684), Vác (1685), Pirot, Niš, and Belgrade (1690)
For the mood in the empire, it was gloomy. Due to the war, the populations suffered from famine, as prices of foodstuffs rise dramatically and in some parts of Anatolia people were reduced to eating roots and walnut husks. There were chaos in the capital as mutineers and mobs besieged and looted the palace of the Grand Vizier. The people of Istanbul then rallied and protested against the mutineers who looted the Old Bazaar.
Sources
"A Military History of The Ottomans" by Mesut Uyar
"Osman's Dreams" by Caroline Finkel