Do not make a problem where you do not need one
Summary: this is not a problem, because either you — as the author — should not make it one in the story, or it has already been dealt with because heat management is a vital system on a space craft anyway.
Take one step back here and apply Chekhov's Gun: do you actually need this plot element for your story?
If the story element in question is not something that is relevant to the plot, then you should ignore the problem. Adding a superfluous story element just for the heck of it never helps the story; it is just a waste of time and effort, both for you as the author and for the consumer.
Simply assume that future development of computers have made computers so energy efficient that you simply do not have a problem of cooling (freezing — as other have pointed out — is not a problem). Already today there are moves towards not just making computers faster, but also to consume less energy per computation. Think about it: would it not be quite silly to assume that mankind has gotten advanced enough to go star-hopping, but have not solved the problem of our computers slurping up stupidly large amounts of energy?
If — on the other hand — this is something you need to deal with in your story, for whatever reasons, then the solution for you is that this was never a problem in the first place, because the designers of the space ship already considered it.
Heat and energy management aboard a spacecraft is a very serious thing. Us mud-stompers (people living planet-side) — that are spoiled with having a near infinitely capable heat sink: the atmosphere — never think about these things. But in space, this is a much different matter. Already today, heat management is a very big issue in the design of space craft, space stations and even space suits.
If you mean to say that the shipboard computers in your story are sources of heat, then the cooling of these will — of course — not be done willy nilly with you carelessly venting the waste heat into the ship's internal atmosphere.
The computers will be hooked up to the ship's internal heat management system
Just as these computers are hooked up to the network and the power supply, so will they also be hooked up to heat-transfer devices that transport away the excess heat, either doing so conductively with heat pipes, or using fluids as a heat carrying medium. The waste heat is then dealt with in a centralized manner by the ship and in the end the heat will most likely be routed to external heat radiators.
A secondary problem with using consumer grade cooling with heat sinks and fans is the risk of fouling. In your own home, this is not a big issue. You just clean it out, or the computer breaks and you get a new one. In a space ship, this is not something you want to have to worry about, because there is no handy little computer-shop around for many light years.
So if you are going for realism, then the proper thing to do is to assume that heat management, computers included, is already dealt with. This is because already today heat management is a very critical issue when it comes to designing space ships.