mature forests are basically carbon-neutral. they produce as much carbon as they absorb because of decay processes and soil formation processes. mature forests are great carbon sinks, however, as they store a lot of carbon and keep it out of circulation. But young forests, when actively growing, sequester carbon at phenomenal rates. That is why planting trees on ground that is afforestable but doesn't have trees on it now is such a good idea.
And the wood from the mature trees killed by mountain pine beetles should be used to build houses... to keep its carbon out of circulation, as if it is not removed, it will just become CO2 during the next wildfire.