Speaking from personal experience mulling wine many times:
In general, you want a dry or semidry red, of innocuous flavor profile. You do not want anything with strong tannic, acidic, alcoholic, brett or sweet flavors; these will become concentrated while mulling and quite unpleasant. Your ideal mulling wine is an inexpensive, inoffensive, young merlot, burgundy, petite syrah, tempranillo, beaujolais, or other "middle-of-the-road" wine, maybe slightly on the sweet side. Cabernet sauvignon, chianti, rioja, and similar wines tend to be poor choices, although of course it depends on the individual wine. Also, look out for high-sulfite-added wine which also can develop off flavors.
I'll contradict Sarge here and say that you do not want a wine which is turning towards vinegar; you'll end up with a very sour crock pot full of mulled vinegar. However, mulling is an excellent thing to do with wines which have been oxidized (but not vinegared) and lost a lot of their flavor, either through being open too long or too long on the shelf. Certainly if you spend more than $9 a bottle in the USA for wine for mulling, you've made a mistake.
This is very similar to how you would choose a sangria wine. The main difference is that for sangria you want bright and acidic flavors, whereas for mulled wine you want heavier, darker flavors.
I haven't cooked chocolate with regular wine per se, but my instinct is that to get the right marriage of flavour you really might need to consider alternative approaches with both a higher sugar and alcohol content: dark chocolate is a very powerful flavour that will obliterate most wine.
So I would try using something else wine-related but with a considerable higher sugar and alcohol content: Port and chocolate certainly can complement each other well - I would recommend a tawny port (I have used this combination as a sauce for a savoury dish). You might try sherry too, but this is slightly riskier territory in my opinion.
A further alternative depending on the dish you are cooking would be to pursue your current course add a third component that will help with the overall flavour structure, typically something bittersweet and with fruit, such as redcurrant jelly.
Best Answer
Unless the recipe calls for a fortified or sweet wine (e.g. madeira, sherry) use a dry or very dry wine, usually white, but not always. You can easily ruin a dish using a sweeter wine, as I once did with risotto.
Whether or not the flavor of the wine comes through depends entirely on the wine used and the quantity. If the recipe calls for a cup of wine, then you will probably notice it in the final dish. If used just to deglaze a pan, then you probably won't notice it at all.
Old wine is fine as long as it's palatable and/or hasn't soured. Beer works great as well.