His father died in the Great Tokyo Earthquake. On top of that, he was severely bullied as a child. It was at that time that he decided that he should be unhappy to make others happy. It is unknown why he was sent to DW, since he didn't have a Branch of Sin to begin with.
Madoka thinks that happiness grows from another's unhappiness. He tried to make the people around him as happy as possible, by being unhappy himself. But he realized that he was happy being unhappy. This led him to the conclusion that when others are unhappy, they will feel happy as well. http://deadmanwonderland.wikia.com/wiki/Shishito_Madoka