Something you always have to put foremost during the tough times is... is x going to make things better now and worse later! If the answer is yes, then it means your engaging in destructive negative behaviour that will only hinder you later.
Recognition.... that type of instinctive thinking becomes a tool. Question yourself, and if the answer meets y, then put z into action.
These are the sort of things you write out and stick on your fridge. If I think x, and answer / solution is y, then action z. All being, a negative thought, and solution is destructive, then change the outcome and implement a positive thought / behaviour to distract during the tough time.
Do it enough, it becomes instinctive and you have changed yourself in a positive manner, 100% your doing.