Since mayonnaise is oil-based, heating it up too quickly on a stovetop can cause it to separate. However, low and steady heat can warm mayo without causing this problem. But, when added to baked goods like cake batter, there's no need to worry about separating. It will bake into the cake with no problem whatsoever.