Reference: Majmoo’ Fataawa wa Maqaalaat Mutanawwi’ah – Volume 6, Page 496
Question: When a Muslim dies, is it permissible to have/show mercy to him if he was a faasiq (open sinner) during his life?
Response: Yes, it is permissible to have/show mercy to him, and to supplicate for him to be pardoned and forgiven, as the funeral prayer should [also] be prayed upon him if he was a faasiq (open sinner) and not [if he was] a disbeliever.