Place cocoa powder, cornstarch, sugar, salt, heavy cream, egg yolks, milk, and chocolate in a medium saucepan over medium-high heat. Cook, stirring, until mixture comes to a boil and begins to thicken, about 5 minutes.
Remove from heat and strain mixture through a fine-mesh strainer set over a medium bowl; discard solids. Immediately stir in butter and vanilla until well combined. Place plastic wrap directly on surface of pudding to prevent a skin from forming. Transfer pudding to a refrigerator until chilled, about 4 hours.