It seems from what your father is doing that he has reached the stage of senility, at which the obligations of sharee’ah are waived, so he is not expected to pray or fast, and any vows, oaths or words of divorce spoken by him are invalid.
If you can be patient and put up with the things he does, then you should do that. If you cannot bear it, then there is nothing wrong with you taking him to a home that takes care of the elderly, on condition that you carry on honouring him and visiting him, and meeting his physical and emotional needs as much as you can.
You should note that Allaah has enjoined honouring parents, especially when they reach old age, because of their great need at that time. Allaah has forbidden mistreating parents in word or deed, even by saying “Uff” (a mild expression of displeasure).
Allaah says (interpretation of the meaning):
“And your Lord has decreed that you worship none but Him. And that you be dutiful to your parents. If one of them or both of them attain old age in your life, say not to them a word of disrespect, nor shout at them but address them in terms of honour
And lower unto them the wing of submission and humility through mercy, and say: ‘My Lord! Bestow on them Your Mercy as they did bring me up when I was young.’”
Shaykh ‘Abd al-Rahmaan al-Sa’di said:
Then after mentioning His rights, Allaah mentions the rights of parents and says, “And that you be dutiful to your parents” i.e., you should treat them kindly in all ways, in word and deed, because they are the reason why a person exists and because they love their child and treat him kindly, which confirms that the child in turn is obliged to treat them kindly.
“If one of them or both of them attain old age in your life” means, if they reach the age at which they grow weak and need kindness and good treatment, “say not to them a word of disrespect”: the word “uff” is the least kind of offensive speech, and what is meant is do not mistreat them in the slightest.
“Nor shout at them” means, do not rebuke them or speak to them in a disrespectful manner. “But address them in terms of honour” means, in a polite, gentle and kind manner, which will soften their hearts and give them peace of mind. That varies according to circumstances, customs and times.
“And lower unto them the wing of submission and humility through mercy” means, be humble towards them and compassionate, seeking reward thereby, not because you are afraid of them or hope for what they have and other motives for which a person will not be rewarded.
“And say: ‘My Lord! Bestow on them Your Mercy” means: pray for Allaah’s mercy for them during their lifetime and after they have died, in return for their having brought you up when you were young.
From this it may be understood that the more time spent in looking after their child, the greater their rights. Also, whoever takes care of raising a person and teaching him properly about his religious and worldly affairs instead of his parents has similar rights over the one whom he raised.
Tafseer al-Sa’di, p. 407, 408
And Allaah knows best.