Preheat oven to 350 F. Grease and flour a 9x13-inch baking dish. Set aside.
In a medium bowl, whisk together flour, baking soda, and salt. Set aside.
1 ¾ cups cake flour, 1 ½ teaspoons baking soda, ½ teaspoon salt
In a large bowl, beat butter and sugar together until combined.
½ cup butter, 1 ½ cups granulated sugar
Beat in eggs, buttermilk, and vanilla until well-combined.
2 large eggs, 1 cup buttermilk, 1 teaspoon vanilla extract
Add mashed potatoes and melted chocolate. Mix until incorporated.
4 ounces unsweetened baking chocolate, ¾ cup plain mashed potatoes
Stir in flour mixture until just incorporated.
Pour batter into prepared baking pan, smoothing as needed.
Bake for 35-50 minutes, or until a wooden toothpick inserted in the center comes out clean.
Let cake cool to room temperature before frosting.
To make the frosting
Beat butter and powdered sugar together until well-combined.
12 tablespoons butter, 3 cups powdered sugar
Mix in chocolate and milk until completely incorporated.
3 ounces unsweetened baking chocolate, 3-4 tablespoons milk, half-and-half, or heavy cream
Spread over cooled cake.
Notes
Cake flour: If you don't have cake flour, you can make a homemade substitute with this recipe. Also, to properly measure the flour, stir or sift it to break it up, lightly spoon it into the measuring cup, and level.
Butter: I use salted butter in this recipe. You can use unsalted if you prefer. "Cool room temperature" means that the butter is about 68F. The butter should dent when pressed, but the stick shouldn't lose its shape or be smooshy.
Buttermilk: You can use regular or low-fat buttermilk. If you don't have buttermilk, you can make a substitute with this recipe.
Mashed potatoes: Instant or regular will work. If you don't have leftover mashed potatoes, I have a section above the recipe that describes how to make enough mashed potatoes for this cake.