Hi,
i want to know that its correct to say someone my thoughts and prayers are with him/her""
Yes, that's fine. However, If you say that, it means you are referring to the dead person. You might also say, eg to his wife, my thoughts and prayers are with you. 'You' here refers to the wife. It depends on wther you want to focus on the living or the dead.
Best wishes, Clive