It depends on how close is to you the person you are giving condolences. For a close friend I would give a long hug and say "lo siento mucho", for the rest of the family "Mis condolencias".
I have heard in this country "Siento mucho tu pérdida", I personally don't like it, besides, it is difficult to pronounce without tripping in the intent.
When giving condolences, latin people use a short hug and kiss (again depending on how close is the person), or a caring handshake. Be prepared to be introduced to the rest of the family during the wake.
Sometimes it is better not to say a word. Just be there showing respect towards the family.
Jess