To make cookie dough, combine butter and sugar in bowl of electric mixer. Beat together on low speed, then increase to medium-high speed and continue to beat until smooth and fluffy, about 2-3 minutes. Blend in cocoa powder. Blend in salt and vanilla extract. Scrape down sides of bowl and blend in egg. With mixer on low speed, add in baking powder and flour and mix just until dough forms. Form dough into ball, wrap tightly in plastic wrap and refrigerate until firm, at least 2 hours.
While the dough chills, make the filling. Combine cream cheese and butter in bowl of electric mixer. Beat until smooth, about 2 minutes. Add in salt and confectioners’ sugar and beat until smooth, about 2 more minutes. Tint with pink gel coloring, if desired. Add in raspberries and beat on low speed just until somewhat crushed and no large chunks remain.
To bake the cookies, preheat the oven to 350?F. Line baking sheets with parchment paper or silicone baking mats.
Place cookie dough on lightly floured work surface and roll into even layer, about 1/4-inch thick. Use 2 to 2 1/2 inch heart cookie cutters to cut out cookie shapes and place on prepared baking sheets.
Bake, rotating sheets halfway through, until tops are just set, about 9-10 minutes total. Remove from oven. Let rest for a few minutes, then transfer to wire rack to cool completely.
Transfer filling to pastry bag with plain round tip. Pipe small amount of filling onto flat side of one cookie, then sandwich together with another cookie. Repeat with remaining cookies and filling.