is it permitted to swallow spit on a fast day or must one spit? this would lead to worse dehydration and if the motivation isn't eating but ridding the saliva in one's mouth without becoming dehydrated is it permissible? I suspect it is in the same sense one can swallow blood in one's mouth and it isn't considered eating...
כ' האגודה פ"י דיומא מותר לבלוע הרוק ביה"כ ובב"ח סי' תרי"ב משמע קצת דלדידן דקי"ל דאפי' אוכלין שאין ראוים לאכילה אסור לכתחלה גם הרוק אסור לבלוע ול"נ דמותר ברוק כיון שאין כונתו כלל לאכילה וכ"ה בס"ח עמ"ש סי' צ' סי"ג:
The Aguda (here left column,10th line ) writes in the 10th (needs to be 9th) chapter of Yoma that its allowed to swalow saliva on Yom Hakippurim. Following the interpretation of the Bach 612 (here from the 8th line)on sefer Haaguda, the Aguda holds as Raavia. Indeed there is a difference of point of view between Raavia and Rambam if there is a prohibition to eat a priori foods that are not edible on Yom Kippur. Saliva enters in this category of foods. So the Aguda allows it a priori (lechatechilla). Aditionally the Bach tells about a great amount of saliva (a half full mouth). For a small amount of saliva, the Bach proves from Rashi Shabbat 70 that there is not called eating at all. But for a great volume of saliva, it seems that the Bach prohibits because we don't hold as Raavia.
(The Mishna Berura quotes the Magen Avraham. The Baer Heytev writes that the Sefer Chasidim also writes that it is allowed to swallow spit).
NOTE: It's clear that we're talking about about regular saliva. But if someone were to take a licorice stick (which activates salivating and gives a good taste to saliva) that would be prohibited on Yom Kippur and Tisha B'av. In other Ta'aniot it's allowed but you cannot swallow the saliva.
There is a machloket about non edible food. The mishna on Yoma 81a says that one who eats them is patur. The Tur OC 612 says in name of Avi Ezri (called by poskim Raavia) says that it's not prohibited. The Bet Yosef writes that the Rambam disagrees and there is makkas mardus. Poskim hold as the Rambam.
The chiddush of the Magen Avraham is that when he swallows his saliva without intention to drink even following the line of the Rambam there is no prohibition. After the lecture of the Bach I understand that he tells about a great amount of saliva.
... there is an interesting discussion amongst the Acharonim, and even the Rishonim discuss it. The question discussed asks if it is permissible to swallow saliva on Yom Kippur? A whole discussion is brought about whether or not saliva is considered a food. The opinion of the Agudah [states that] clearly it’s permissible. He considers it as a food, but not really a food that is consumed, so he doesn’t have a problem with it. Others don’t even consider it a food at all. Some Rabbis want to say like the Chatam Sofer, whereas he makes a difference between the night and the morning. He says that at night, you should avoid swallowing saliva, since your saliva will still have the flavor of the food that you ate at the Seuda Mafseket. But on the next day, he says, you don’t have any problem, and you can swallow your saliva.
Dailyhalacha.com concludes by writing:
The Halacha, our Poskim all say clearly, that it is permissible to swallow the saliva on Yom Kippur. Of course, one should not have Kavana (concentration) to collect the saliva in his mouth and then swallow it in order to somehow quench his thirst or something like that. One should be careful not to have Kavana. Pray normally, and don’t be pre-occupied with your swallowing, and you will have no problems. The Halacha, it is permissible to swallow the saliva on Yom Kippur.
Obviously if it is ok to swallow one's saliva on Yom Kippur it can be extended to any fast.