How can I comfort my rat if she is in pain? ... at delivery?

Electric heating pad under half of aquarium (set on low), unless its too hot for added heating. Remove houses so you can monitor rat. Talk to a vet if needed, but rats are pretty good at having babies on their own and there isn't much you can do other then watch for excessive bleeding or other signs of trouble. Some rats enjoy shredded paper towels at this time, but make sure they are the non-scented, no dyes (patterns), plain white ones. Try to avoid touching the new babies if you can help it, since this may stress the mother and even a loving, kissy rat may nip you if she views you as a threat to her babies. Its not generally a good idea to give a rat in labor aspirin or other pain killers as it may cause labor to stop prematurely in some rats. Best to let nature take its course.