Exclude a free product from total calculation
Create a rule with the event Calculating the sell price of a product.

There, you can check for the SKU of the product and set its price to zero (using the Set data value action).

You can also use the Subtract an amount from the unit price action to assign the value to a price component so that it appears in the totals (this will require extra configuration)