I would heavily advise to not start something that you wont be able to stop. the fac that you are posting here shows that you are on the right track with that.
I would also recomend seeing a therapist about your family problems. The Torah is many things, and in some ways it can serve to be theraputic but it shouldnt be the only means of therapy you use. that is very dangerous spiritualy and it could result in hiding from problems, and not dealing with themm which if you ask me is what the Torah asks of us to do.
I too feel loneliness in yeshiva sometimes, and also want to go back to my old ways when it happens but you have toremember that they didnt solve the lonliness, they only made it feel like it wasnt there. shallow relationships are on par with no relationships, and the solution is to get out and try to make new deeper relationships. I am speaking to myself right now when I say you gotta try to work on the good relationships you have, and that with Hashem, not go back to old ones.
thats my brief novice advice. bhatzlacha!