These two tips given to me when I first started playing poker are for me, the best tips you will ever get.
The first one is this.
DONT PLAY WITH WHAT YOU CAN'T AFFORD TO LOSE
That on face value appears to be financially orientated, but in fact there is more to it than that.
Dont play with friends for money. You could fall out with them and theres nothing worse than losing a friend.
Dont play with time that you dont have. If you are spending all your life playing poker then you arent making time for the other things in life like family and friends..
So obviously dont play with money you havent got, and dont play with friends you cannot afford to lose and time that you should be spending doing other things.
The second one
A WINNING PLAYER IS THE ONE WHO KNOWS WHEN HE'S LOST.
When you've exhausted your bankroll then its time to stop. You have been beaten. Accept it and walk away. Go back when you can afford it.
Likewise, when your in a hand and you run the risk of losing too much then discretion is the better part of valour. Accept you have lost and fold your hand. If you arent sure then take it you've been beaten and take it gracefully.