Firstly you need to create some space to reflect on what is happening. Get some distance from the situation either by reflecting on things objectively or with someone who can help you get perspective. Then you will need to think about when you were motivated and engaged; what were you doing? What were the ingredients of that experience that made it so successful? What were your achievements? How did you feel? What helped you to feel that way?