A realistic heat bath: theory and application to kink-antikink dynamics