What is this metal part around the fan's motor in my freezer and how to prevent it from rusting?
From my point of view this metal part is a base plate which makes it possible to mount the fan onto the plastic parts.

As RedGrittyBrick noted, it is (or better was) zinc-plated. It seems to me, that most of the zinc layer is oxidized and cannot provide galvanic protection anymore. So why did it loose the zinc layer so quickly?

If it was behind a cover before, it might be, that the cover was to protect the fan and the base plate from humidity and corrosive vapours. Food can emit corrosive vapours like vinegar and almost certainly a lot of water even at temperatures below freezing point. 

But the usage of bathroom cleaner might have been the death sentence for the zinc layer, because bathrom cleaners are highly acidic and can dissolve zinc quickly. 

Anti rust primer can do the trick but you will have to coat the part carefully and without gaps. After that you can coat it with an additional protective layer. And you should try to get some stainless steel screws equivalent to those used there, as it is impossible to coat the screws. 

There's one major drawback on using anti rust primer and other coatings inside your freezer. They tend to evaporate VOC and other nasty things in return which may enter your food. Something I wanted to avoid. 

Alternatively you could clean the part thoroughly from any rust and screw some magnesium or zinc liner onto it. This liner will jump in for the lost zinc layer. And put the cover back on to reduce the amount of humidity reaching that part.