These posts are really sad. I had many neighbors in their 80s and some in their 90s who are the way you described. One of my neighbors sort of attached herself to me. She had two sons who never visited and no grandchildren. She was lonely and widowed. She just needed someone to visit and help her out with errands like grocery shopping. I enjoyed talking to her. I learned a lot about what life was like when she was a young woman. She was born in 1909. I found that when I spent some time with her, she was in a better mood. She was really pleasant to be around. I am not one of her relatives so I had a little emotional distance.
I think that sometimes elderly people see that so many of their friends and family members including spouses and children have passed away, and miss them, and they know that they are at the end of their lives. Sometimes they feel afraid and regret for the things that they have or have not done. Sometimes they are physically ill and they suffer from depression and loneliness. I think that their hostility and anger is a mask or a way to cope. I think that they need your patience, understanding, and your time. The only advice I can offer is to show them that you love them, respect them, and that they are valued by you and your family.