Offering support for professor?

C

So I took a class where this professor was really enjoyable. He was personable and talked about a lot of different things. The next semester I did an independent study with him and it was just the two of us. He would often talk about situations where people had taken advantage of him in his life (schoolwork wise). I would say I do like him but do not think it would be wise to do anything about it. However, the last email he sent he talked about how he dwells on the negativity too much and that i should keep on touch (I am graduating this week). So I am debating whether or not I should tell him he can always talk to me whenever he needs to because talking about stuff seems to help him. I feel it’s weird coming from a student but at the same time I do care about him and enjoy listening to him and he doesn’t seem to have many people to talk to besides his colleagues. What should I do?