We will pray for you.
This is my understanding so it might be flawed.
If you question if those things are a sin:
If you did not choose to harm yourself but your condition compelled you than you didnt sin at all because you had no choice in the matter you could not choose to sin (sin is a choice.)
If you were compelled but you still chose it was a sin, and you had the ability to choose, it was a venial sin (as in its a bad choice, and its a sin, but not a sin in which you choose to fully reject God)
If you are obsessive compuslive like me it is often best not to worry about which. It is best to just go to confession, explain to the preist our situation, and let him deal with it. Satan tries to make you think your sins are more than they actually are. He is evil, and he is tricky. God’s love for you is so much more immense than any sin of yours. If God is infinite, his love is infinite. If you are finite, your sin can’t surpass God’s love. After you go to confession the sin will be all gone anyway, so just go and you won’t have to worry about it anymore.
Try going to daily mass on a weekday, talk to your priest about substituting going during the week for going on Sunday. There are normally less people and its easier to find a place seperate from everyone else.
God made us, many times what people call disorders can help us actually grow closer to Christ while helping that “disorder” in the face of other people. People with OCD (obsessive compusive disorder) might start saying prayers in leiu of one of their other compulsions, or if they have trouble touching doorknobs let them say a prayer every time they do. This gives glory to God, and he strengthens them to be able to do these tasks. If you have depression, it makes it easier to identify with Christ’s passion, with the pain he felt. If you have depression it is easier to look on yourself as worthless, because we are worthless compared to the infinite God. It makes it easier for us to empty ourselves to him, so that he can fill us. It is painful, but that is when we can join to Christ as he in such emotional agony at the Garden of Gethsemene that he sweats blood.