I am a retired mental health counselor. In the 1880s, psychiatry was in its infancy. Freud was just beginning to expound on his theories and other major theorists of the early 20th century had yet to write much.
I had not heard of "terminal dementia" before this. It sounds like a hodgepodge of non-diagnosis, essentially a catch-all term. I would not put much faith in it, nor would I assume it is related to bipolar 1 or II or schizophrenia, which would normally present much differently from what is mentioned here.