This is really hard.
I think part of the key is this: if you give something or do something for anyone else- money, help, emotional support, etc.- you need to really take a good hard look at the situation first and ask yourself why you are doing it, and if it is really something you want to do. Or- are you doing it because someone is making you feel guilty, or you are worried about what others will think if you don't?
Either way, once you figure out exactly how YOU feel about the situation, then you can decide what you want to do. It might be hard to break the habit of automatically saying 'yes' no matter what or who is asking, but you need to do that.
Secondly, and maybe even more importantly- once you really think about a situation and make a well-thought out decision to help someone or do something you must then LET IT GO.
If you choose to give money to a man on the side of the road, of course you hope it isn't a scam. You hope he really needs it. You hope he will spend it on food or a warm coat and not on booze or drugs. BUT- once you give that money, you have to release control of it. Know that YOU acted in good faith and for a good reason and that has GOT to be enough for you.
You cannot ever control other people's reactions or behavior, etc. Sadly, even friends will sometimes disappoint you. You might help someone and think they will be grateful- but they are so embarrassed they had to ask that instead they cut you out and stop talking to you.
That kind of thing is painful- especially when you yourself might be going through tough times and need the same help and support back. But- again, you have to know in your heart that you did what you did for the right reasons- just to be a good person and help out- and that has to be the main reason why you did it.
I am not saying allow so-called 'friends' to take advantage of you all the time. People who do that just suck you dry. But- your REAL friends will want to help and support you and will show themselves true and loyal, no matter what is going on in your life.Focus on them- and remember, be true to yourself. You are a good person and did what you did out of that goodness and fairness. Just weigh each situation as it comes and be strong about what YOU really want to do. Good luck!