Psychologically, we are known to act in a way that reflects the people we are surrounded by. So if you are going to hangout with pessimistic friends, then expect yourself to feel less optimistic about your own potential. Usually, these people are around to use you anyway. They compose an artificial circle that will bring you down more than it pushes you up.
If they do not present a positive worth, then you should question their worth as friends to begin with. Always remember this rule of thumb: you are whom you surround yourself with. So surround yourself with those who are positive.
done this so many times, it’s great