Cry not for the dead, for one day you will meet them again in joy, if they were saved.
I understand it can be hard to be separate from a bond with a loved one. However, I would warn it could be dangerous to even talk to them over a photograph - it could invite a demon.
While it may not be intended in any way, it is better to avoid speaking out loud to a dead loved one altogether, because a demon will try to use that to trick your mind, especially during vulnerable times of grief.
Rather, we should rejoice at the loss of a loved one who was saved, for now you know you will meet them again for eternity, although for a short time you will have to do without them, and you may grieve that; but I would warn against talking to the dead or saying such things, even if unintended.
Speaking at the graveside is even more dangerous, because this is directly communicating with the dead, even if you thought it was only one-sided. It could be scary if one day you received a response, because it would be a demon and not your loved one.
Scarily, necromancy by speaking to a dead loved one at a graveside is often promoted on television. It would otherwise not be natural to go if one had not seen this on tv.
I believe that we should not dwell on feelings of sadness, but rather rejoice in the joy of the Lord and accept all suffering as a part of life, and pray that the Holy Spirit gives us strength.
We should be trusting on the wisdom and joy of the Lord, not on our own emotions and speaking out loud to dead loved ones, because they cannot hear us -- but someone else may be listening: a demon. If you speak out loud to the dead, you are without knowing it giving the demon permission to enter your life.
Simply trust on the Lord for your joy, we should not look to other humans to receive joy. Losing a loved one is hard, but the Holy Spirit can help us through. Pray to the Holy Spirit when you are feeling grief, do not speak out to loved ones or visit their graves to talk to them. They cannot hear or see you, but demons can.
So beware, be on your guard, and put your trust and hope and joy in God alone.