Where did it go wrong?
It seems you played OK until the endgame. By move 27, you had 7 pawns going against 6 pawns, and a bishop against a knight (a clearly superior position). But then, you allowed your opponent's knight to roam freely, taking several of your pawns. Don't let this happen! At this point, you should have been doing two things: defending your pawns, and taking your oppenent's.
Also, remember that connected pawns (when your pawn has another of your pawns on an adjacent file) are better than isolated pawns (unconnected pawns), and you should always make sure that your pawns remain connected. After 27... d5, you took, trading your pawn for theirs. In doing so, you isolated your f-pawn. Had you waited for them to take your pawn, and taken back with fxe4, then they would be the one with the isolated pawn.
One last comment... your bishop sacrifice (9. Bxh6) wasn't that strong of an attack. You only got one pawn out of it. Don't play risky sacrifices like that (unless you have a follow-up plan).

redblack, thank you. i never even considered to let him take the pawn instead of taking it myself. i got too focused on checking the king and trying to promote the h-pawn
knightstour, my logic was to keep his b-pawn from becoming active

In relation to your plan, 12. Ne2 was a mistake. you had 3 options: Qe2, Ne3, or Nh4. You opened up black's king position (prematurely, I might add) and you needed to get your pieces over there to attack. On move 18 black had Rxg3 and missed it. Your king had to move out of the pin situation at some point.
In general, I would say that you didn't take good care of your pawn formation(s). you had 3 pawn islands before move 31, then ended up with 4 pawn islands. that problem compromises your entire end game.
39.Rf6+ better was 39.Rg7+ forcing the king back and putting black's rook out of play.
It seems to me that inexperience is the main problem. Some of your assessments are good, some are workable, but having an understanding of what your opponent is thinking or planning seems to be lacking. For instance, when you open a file, make sure that you can use it and not your opponent, because you opened the g file only to give black an opportunity to use it.

Hello!
Please remember, 'the sweet ain't that sweet without the bitter!"
My husband and I love playing chess! Chess, unlike many games...rugby, baseball or hockey...has you playing as an individual....Therefore, you are your own akiles heal!
If you turn your perception of your loss into a learning experience...you can take that view of sweetness into your next victory!
Cheers, Joann