My question is: How should we deal with such matters, especially on the occasions mentioned?.
There is nothing wrong with the khateeb speaking about the battle of Badr or Uhud, or any other battle, and describing what happened on such occasions at the time of the Prophet (peace and blessings of Allaah be upon him). This is not regarded as celebrating it or introducing a festival that is not prescribed in Islam, because it is simply reminding the people of that battle and, more importantly, deriving useful lessons from it.
With regard to national holidays, if the people celebrate them and take them as a kind of ‘Eid, then the khateeb should not take any part in that, and speaking about such occasions may be understood by the listener as meaning that he is joining in and supporting this innovation.
But if the Ministry will punish those who do not speak about these occasions, by preventing them from delivering khutbahs or other penalties, then the khateeb should weigh up the pros and cons, and decide whether the interests served by his remaining as a teacher, daa’iyah and guide will be outweighed by the negative consequences of a speech which may damage his reputation among the common folk, or not.
It seems that the wise khateeb can use these occasions in order to say something useful that will reinforce the ideas of the causes of victory and the factors that lead to defeat, the laws of Allaah with regard to the rise and fall of societies, and the concept of al-wala’ wa’l-bara’ (loyalty towards the believers and disavowal of the disbelievers), the necessity of turning back to Islam, and other important concepts which the people need to know.
In this way, the interests served by his speech will be many times greater than the negative consequences referred to. Islam seeks to bring and fulfil what is in people’s interests and to ward off and reduce harmful effects, by choosing the lesser of two evils, as is well known.
And Allaah knows best.