i would not think it is sinful, but it is a sign of illness, you should see a priest and medical help/counselling, i know this sounds strange although i never had suicidal thoughts before i helped a friend move house into a tower block of flats, i walked out onto the balcony and looked out and down enjoying the view, and all at once a voice/thought was urging me to jump end it all type thing,when i left the house i never experienced those feelings again, just beware for those who roam seeking to destroy souls, the next time i visited i gifted him holy water rosary beads and a crucifix, sorry that was lenghty