A capacitor module, in particular for use in an inverter of an electrical or a hybrid vehicle, said capacitor module comprising a housing, at least one capacitor element mounted in said housing and at least one busbar at least partially mounted into said housing and being electrically connected to said capacitor element, the housing comprising a bottom wall, a side wall and an upper wall, wherein said upper wall comprises a peripheral portion made of a sealing material and an central portion made of a thermal dissipation material, the thermal conductivity of the thermal dissipation material being bigger than the thermal conductivity of the sealing material.