Raise when you are winning(flush, you did good), don't raise when you think opponent might have a big hand(opponent overbet with straight on turn, bells should be ringing as you are on a draw to a flush or a boat, don't raise).
Hand 2 was the only hand I think you could have avoided a larger loss than you did. But it's fucking hard to get away from 2 pair plus flush draw.