Spray a mist of water on the gaps and then use a can of expanding foam to fill the gaps. If you want to make it mouse proof, wedge course wire wool in first.
Most cans need to be used upside down. Mega_Foam by BondiT can be used at most angles
Edit- sorry, was composing the post before @RandomGrinch replied.
The water helps the adhesion and curing process.
Wear the gloves provided in the lid.
Do not smoke whilst working with it- the propellant is flammable.
If you are messy, have some acetone to hand to clear up any mess, alternative buy a can of foam gun cleaner.
The cans are sold as ones provided with a "straw" nozzle, or to fit a foam gum.
If you need to find a tradesperson to get your job done, please try our local search below,
or if you are doing it yourself you can find suppliers local to you.
Select the supplier or trade you require, enter your location to begin your search.
Please select a service and enter a location to continue...
Are you a trade or supplier? You can create your listing free at DIYnot Local