I used to have suicidal thoughts long before I was a Christian. If someone is having suicidal thoughts it is because things are not going the way you would like them to go in your life. It is being in despair about your life and how bad you have it. But God wants us to take away that despair and self pity and replace it with love, peace, and joy when we ask Him to see what His will and His plan for our lives is. Not our plan and not our life, but God's plan and will for our life. When we ask God for His love and peace, we are seeking His will and direction and we are letting go of all things we are in despair about. For example: If it is a person that you love and want to marry and they are leaving you, and you feel that you are sad and in despair; One needs to ask God's will for their life instead of beating themselves up as to any mistakes they might have made. They need to seek the Lord and do admit to anything wrong they might have done before God. They need God in their life to heal them. Asking God to come into their life and to fill their life in every corner whereby they are only seeking His will according to His Word will heal them.
It's never wrong to pray for Jesus to heal you and to seek His will for your life (According to His Word).