Resident foaming at the mouth

I'm a CNA at a long term nursing home and a resident there is on comfort care. I'm talking to another CNA who states this resident was foaming at the mouth. I ask, like rabies? They say idk. I go check on resident and he wasn't foaming but had a gooey white substance on his lips. Reminded me of another resident who had gooey eyes and couldn't open them all the way until it was cleaned. Anyone seen this before, is it just saliva?

Update: I went to say hi to him last night. He said, let me hold your hand. I said give me a fist bump first. We bumped and I held his hand. He said, I'm dying. I said I know man, that's why I came to say hi buddy! I'm gonna miss this man when he goes but at least he will be in a better place and not suffering anymore. He was still alive when I clocked out but I saw some ambulance as I was driving away, hope it wasn't him yet, gotta give him another fist bump and some cheezits!