If you have the skills to do so, the most optimal character to secondary along with Doc would be Megaman.
Megaman's great matchups against the likes of Sonic, Rosalina & most swordies are extremely valuable for Doc. On the other hand, Doc's great matchups against the likes of Mario & Fox can be quite handy for any Megaman player. This is almost a perfect combo, leaving you only with a shaky, but doable Sheik matchup for both of your characters.
If you don't want to spend too much time on it tho, since Megaman is hard, you can always try some other zoners. They tend to have decent to good matchups against zoners, which is valuable for us, as well as a fairly decent Sonic matchup for the better zoners, so yeah, any good zoner can do the work as well.
If you're not too fond of zoner & can deal with swordies decently well but struggle especially against Rosa&Sonic more, i'd advice Wario, who has a decent matchup against these two, and will definitly help you develop a more patient game, something that may be handy for some matchups that Doc may have to play, including Swordies.