I think this world may be something like a maze and we are the rats in the maze. What we need to do is find our way out of the maze and sometimes we get a little tired of hitting dead ends and that's what puts us in a state of depression or frustration or simply not wanting to live.
The concept I have for the purpose of life is that we have to find a way out of the maze and that maze is of course the thoughts and emotions we feel based on all the wrong turns that we made in the maze during our life.
If we can actually find a way out of the maze, that will change everything, and that to me is the whole purpose of our existence. To find our way out of this maze is not just for our own sake, but the sake of all the other rats in the maze called humans.
I think that depression is when we see life as all about 'me' but when I remove myself from the story, and if I become irrelevant, and my life is just to get out of the maze for the sake of every rat on the planet so we can all find our way out, then it makes life worth living.
Maybe it is like the 100th monkey effect. When enough monkeys solve a puzzle, all of a sudden all the other monkeys can do it also.
Now the question is, what happens when all the rats get out of the maze, or even if only a few get out. Will that mean the experiment is over? Then what happens?
There are many ancient sayings; 'As above, so below." or 'The microcosm in the macrocosm'. 'The child will emulate the parent.' The Sufi say; 'He who knows himself knows God.' There are many such sayings all telling us that basically, to know our creator, whatever you perceive that to be, we only need to deeply understand ourself. And we do run rats through mazes to learn many scientific discoveries, so why wouldn't our creator be doing that as well?
If this is true, we are presented with a very complex next question which is, each person is so different from Hitler to Gandhi, so how could I know God by knowing me? I as an individual am so limited and God must be unlimited.
A possible answer to this is that each individual is far more complex than the limitations of the ego personality that we currently live. That is to say, you may be evil but you have good in you, and likewise, no matter how good you are, you have evil potential in you as well.
Thus we can conclude that if enough humans or rats can solve the maze by accepting whatever they are as the individual and devoting their life to change, hopefully we will just work on change for the better and not become criminals, but for the bad to become more good, and in that conversion we actually progress through the maze, and finding our way out, can lead others through. Then when enough of us little rats make it through, the experiment ends.
If this is what our life on this rock floating in space is all about, then no matter how bad a person is, they play a vital part in the liberation of all humanity. In fact, the ones who have been so called bad may play a greater part of more value in their reformation as they will have a wider and more varied amount of experience to help overcome the pitfalls and traps of the maze, helping others to avoid the quicksand and open manholes.