That's an art, not a science.
We all know people who always have some drama in their life. Don't bother with them. This is how they define themselves, and without drama they would be at a total loss.
There is no prescription for who is deserving/desirous of your help. It's like... there are some homeless people you give money/food/attention to, and there are others you don't. It's a gut feeling, and it can be surprising how smart your gut is.
And, like archery or badminton or woodworking, helping people is a skill set that you hone over time. But keep doing it. Keep learning.
And take a break sometimes to take care of yourself. You are letting people drink from your well, and if you don't take time to replenish that well, it'll run dry.