  We consider Casimir-Polder and Casimir forces with finite dissipation by
coupling heat baths to the dipoles introducing, this way, dissipation from
'first principles'. We derive a representation of the free energy as an
integral over real frequencies, which can be viewd as an generalization of the
'remarkable formula' introduced by Ford et. al. 1985. For instance, we obtain a
nonperturbative representation for the atom-atom and atom-wall interactions. We
investigate several limiting cases. From the limit $T\to0$ we show that the
third law of thermodynamics cannot be violated within the given approach, where
the dissipation parameter cannot depend on temperature 'by construction'. We
conclude, that the given approach is insufficient to resolve the thermodynamic
puzzle connected with the Drude model when inserted into the Lifshitz formula.
Further we consider the transition to Matsubara representation and discuss
modifications of the contribution from the zeroth Matsubara frequency.
