Your purpose in life is the thing that gives you the most joy. If you find yourself doing what is not joyful for you, you are not following your chosen path.
When you feel unhappy with your life, examine what you are doing and see what it is that's missing. Where have you gone off track? What can you do to get back into the life that brings you happiness?
These are the questions you need to ask yourself and see what it is you need to do to flow smoothly with the life you have chosen to experience.
You hold all the answers to these questions in your heart. Listen to it. FEEL what is in your heart and act upon those feelings. When your actions are bringing you joy, you are on the track that is the most perfect for you.