Muslims be careful what is your motive? Are you sure you are truly martyring yourself just to please Allah and not just to go to Jannah? That would be haram. Think about it.
If you sin or have had performed haram with the following thinking that its ok, and you will go to Jannah anyways because you plan to martyr your self during a jihad. This is wrong thinking you will most likely not go to Jannah.
This also includes performing sins or haram or while executing jihad.