Fears in all species are being resolved using learning theory.
Counter Conditioning is when you replace an unwanted behaviour response (like fear of fireworks) with an alternative that is either incompatible with the current behaviour (ie can not physically be done at the same time as each other) or is a more pleasurable experience like using a high value food item to distract an animal from separation anxiety (food puzzle, food ball).
Systematic Desensitization is when you expose any species to a low level of what they are afraid of so as not to push them over the threshold. Each time they are comfortable with the stimulus you increase the volume/intensity to push the boundary without causing a big reaction. This process continues until the individual is comfortable and does not get frightened even with full exposure to the stimulus.
The latter is most useful with fireworks but the process can (and should) take a long time therefore treatment needs to be started months before expected events.
Many behaviourists are now suggesting that you wont reinforce fear by cuddling your pet when fireworks are going off (this differs to what the common advice was a few years ago at the vets, where it was suggested that cuddling them in a fearful state would reinforce that there was something to be afraid of). This is not to say that you must cuddle them and drag them out of their hiding place to do so. This would come under the topic of flooding and learned helplessness where they realise that they can not escape and shutdown into a depressive like state.
See also – A quick note on flooding