Don't know what to do

Okay so I've been posting here for advice and I was told to talk about it with him. We had a conversation about his communication. He said he gets his ways from his father. He said all of his past relationships have been like this with his issues. Sometimes he seems like the type to be a loner. When I tried to end it, he said we should work it out. He said he's going to go to therapy and work on his issues. He opened up to me about some personal stuff and how he's trying to work on himself. He says he doesn't know how to deal with his emotions. I know he cares about me. He'll drive to a different state to see me just for a few hours. I really like him. But, I don't know if I can deal with this. It's frustrating. Some days he's here others he's so distant. I can see that he can be unhappy. I want him to be happy and I want him to be better. Am I selfish if i give up?