Is it a real name? Yes. Is very common modernly? No.
There are two Scottish-Gaelic forms of "Thomas:" "Tòmas" & "Tàmhas." As I understand it, "Tòmas" is Scottish twist on the primary Irish-Gaelic form, "Tómas." "Tàmhas," on the otherhand, is a natively Scottish translation from English and an older form at that.
"Tavish" is a reanglicized form of "Tàmhas" based off of its vocative/genitive tense.
I'll explain using a similar name: "James" is translated into Scottish-Gaelic as "Seumas." "Seumas" is the nominative form of the name, pronounced [SHEY-mus]. The nominative tense is the default tense, and used when talking about "Seumas." But the vocative tense, similar to the genative, is used when talking to "Seumas." This is expressed in Gaelic as "a Sheumais" (the 'a' is a vocative particle). In this tense, "Sheumais" is pronounced [HEY-mish]. It is this vocative pronunciation that gave rise to the reanglicized form of "Hamish."
So for "Tàmhas," pronounced [TAW-vas], the vocative form is "Thàmhais," pronounced [TAW-vish] or [HAW-vish], and this has been reanglicized "Tavish."
And there you go. Now I don't think "Tavish" is common as a given-name at all, now or ever really. Thusly it is not included on this website.
And Chrisell is correct in correlating it to the surname "MacTavish" because Gaelic names uses the genitive tense after the 'Mac' or 'Ó.' In this case, the original surname is "Mac Thàmhais," thus the 'Son of David' attribution is incorrect.