Killing a Animal to prevent painful of that Animal.Is it consider as a bad thing for me according to buddhism? Note : Sorry for my bad English. If anyone can please edit the question for better meaning.

There is a dog. But dog is spending very painful life after huge burning(just before 10-20 minutes ago). It is very painful. I repeat it it is very very painful.  

So if I kill Dog, is it consider as a bad thing for me according to buddhism?

If I do it, I will do it just only stop painful of dog.

So is it consider as a bad thing for me  according to buddhism?
Even mercy killing is considered bad and also breaks the precepts.

The dog is going through its pain due to karma. Say you kill it and goes to a worst hellish state by killing it you are putting to a far worse experience. 

If you treat the dog's wounds and try to heal it you are creating good karma for yourself and also easing the pain for the dog. This is be best avenue to consider.