If my location is secure, I would definitely listen to some music. Staying mentally sharp is essential. I would take any opportunity I can find to pop on some music to escape and refocus.
I think if your somewhere that isn’t in immediate danger, in a safe house of some kind then I think its ok, music helps us, were like it as a species, a favourite song can up lift us from a dire situation, it can give us the energy to continue the fight and it can help us through losing someone. But as had been said prior, while zombies are a real threat then no music would be a better bet
For me I need to listen to some Son House or Mississippi Fred McDowell to relax, after getting through a bad situation or nearly getting eaten alive I’d need something to simmer down a bit. If I did have my delta blues in a zombie out-brake I’d probably lose it a bit lol.