It is permissible to kill mice/rats in all situations however it must be done in a means that does not cause torture to the animal as it teaches in Islam to be kind to animals. These quotes can be found at the end of my post****.
Al-Qaasim ibn Muhammad said: I heard ‘Aa’ishah, the wife of the Prophet (peace and blessings of Allaah be upon him), say: I heard the Messenger of Allaah (peace and blessings of Allaah be upon him) say: “There are four things which are faasiq (corrupt) and may be killed at all times, whether one is in a state of ihraam [for Hajj and ‘Umrah] or not: kites, crows, mice/rats and mad dogs.” Narrated by Muslim, 1198.
Mice and rats are harmful creatures, as the Prophet (peace and blessings of Allaah be upon him) explained: Ibn ‘Abbaas said: a mouse (or rat) came and started dragging the wick (of the lamp). It threw it in front of the Messenger of Allaah (peace and blessings of Allaah be upon him), onto the mat on which he was sitting, and it burnt a hole the size of a dirham. He said, “When you go to sleep, extinguish your lamps, for the Shaytaan will tell creatures like this to do something like this so that you will be burned.” Narrated by Abu Dawood, 5427.
Al-Bukhaari and Muslim narrated in their Saheehs that Abu Moosa al-Ash’ari said: A house in Madeenah burned down with its people inside. When the Messenger of Allaah (peace and blessings of Allaah be upon him) heard about this, he said: "This fire is an enemy to you, so when you go to sleep, extinguish it.” Al-Bukhaari narrated that Jaabir ibn ‘Abd-Allaah said: the Messenger of Allaah (peace and blessings of Allaah be upon him) said: “Cover the vessels, for the mouse/rat may drag out the wick (of the lamp) and burn the occupants of the house.”
Something similar was narrated by Muslim, in which he says: “For the *fuwaysiqah may start a fire and burn the house and its occupants.”
*The mice or rats that may live in people’s houses are among the harmful creatures or vermin (fuwaysiqah) which the Prophet (peace and blessings of Allaah be upon him) commanded us to kill in all situations, whether we are in ihraam or not.
****Generally, it is not permissible to inflict unnecessary harm upon animals. This is based on the Hadith narrated by Anas ibn Malik (radiyallahu anhu):
“The Prophet (sallallahu alaihi wasallam) forbade the harming of animals.” Sahih al-Bukhari: Hadith 5513, Sahih Muslim: Hadith 1549
However, if there is a need to kill them, such as to preserve oneself or one’s food, it is permissible.
The Prophet (sallallahu alaihi wasallam) said: “There are five animals in which there is no harm in killing: crows, hawks, mice/rats, scorpions and dogs.” Sahih al-Bukhari: Hadith 1928
Nevertheless, whilst killing such an animal, unnecessary harm should not be inflicted upon it.
The Prophet (sallallahu alaihi wasallam) said: “Indeed, Allah has prescribed excellence in all matters, so if you kill, kill well, and if you slaughter, slaughter well.” Sahih Muslim: Hadith 1955
And Allah knows best