Try to think about good things in your life before you go to bed. It is not going to be easy in the beginning but try with very minor things which made you happy during your day- for eg: you ate something good, any friend you like, any comment which made you feel better. Every day try different things for couple of days and write them down. It will help.