One police officer killed many innocent man and he is extremely corrupt. Recently he got arrested for his deeds. If he proves guilty then he will get death penalty. But during prayer I asked for his punishment as a death penalty. But somehow I felt guilty for asking someone's death. Is it okay for me to ask? If I did anything wrong then how can I ask forgiveness?
The Prophet himself (saws) has asked for death penalty, so it cannot be a sin. However, he (saws) also showed mercy when it came to the judgement, so those people who say sharia law is always to opt for the maximum penalty are in error, too. Death penalty has four major drawbacks: Nobody can make a person alive if it comes out that the person was not guilty. It is very often abused by injust governments and systems. Mankind tends to become rude when death penalty is applied because those full of hatred become loud. The sinner, if he is, is deprived of any chance to repentance. In this sense, your prayer is not a sin but your doubts whether this kind of prayer is good, has a good reason, too.