Was it a sin? Yes, but it could have been worst; go to confession and learn to love yourself. I suffer from slight depression and mood swings (it's basically bipolar disorder), and it took me almost 15 years to come to terms with this issue; what happened the most is focusing on God, on internal turmoils and how to redirect that energy, that raging fire towards things which are, in a Christian optic, constructive. Go to the gym to vent out your stress and despair, not to be vain; take an hobby not to simply kill time, but to develop a skill and talents that God may have placed in you and you left dormant; go out every once in a while, hang out with random people and just chat while having a drink (just don't get wasted).
I see you are in need of love, you want companionship…we all want, nothing is more frightening that solitude (Nietzsche got it right here: it is a thing for the lowest of beasts and monsters or for the greatest of saints), especially in this bizarre world where we are surrounded by idols coming out of the ground everywhere and living, walking, existing in a crowd of atomized individual, monadic nomadic entities bouncing into one another without recognition of who or even what we are, are doing and who or what the people next to us are doing as well. It is the reason why we need to be glad to be blessed with His faith, that we were found by Him…now we need to fight to survive the night, for the sun will rise again and the battle is already won.