There is nothing wrong with having a good platonic friend, nothing wrong with physically comforting someone in a time of emotional distress, and your "friends" who criticize you for having a best friend you can confide anything in are either joking or fucking jerks, depending on how seriously they say it. I've hugged a guy when his fucking dog died and I didn't even know him that well. Nobody thought it was weird (not enough to comment on it anyway). From the relationship you described it just sounds like bromance, which really, all guys should seek. You should have a friend like that. We all should.
BUT
from how fucking terrified you are of being gay/being perceived as gay, I'm gonna guess you actually are a little bit gay. Most homophobes are.
Think about sucking his dick or taking it up the ass or something, really consider the logistics and stuff, and if you get an erection, guess what? Nigga you gay.