Have all ingredients at room temperature, about 70°F. Preheat the oven to 350°F. Grease and flour a 13 × 9-inch pan or two 9-inch round cake pans, and line the bottoms with parchment paper.
Whisk together in a medium bowl:
Melt in a double boiler or heatproof bowl set over barely simmering water:
Set aside to cool slightly. Beat in a large bowl, or in a stand mixer with the paddle attachment, at medium-high speed until light, about 3 minutes:
Add to the melted chocolate, mixing until smooth:
Beat the chocolate-mayonnaise mixture into the batter. On low speed, add the flour mixture in 3 parts, alternating with:
in 2 parts, beating until smooth. Scrape the batter into the prepared pan(s). Bake until a toothpick inserted in the center comes out clean, 30 to 40 minutes.
Let the 13 × 9-inch cake cool in the pan on a rack. For round layers, let cool in the pans on a rack for 10 minutes, then remove from the pans, peel off the parchment, and let cool on the rack.
Fill and frost with: