Question: In a song I am learning, there is a section of the song that has the chord progression G#m | A#m7b5 | B6
I sometimes get the fingerings wrong and use dimished 7th chords on guitar instead of m7b5 chords and in this case I actually think the dimished7th chord sounds good too. So I wanted to ask, what is the difference functionally between the two? They both seem to work in most situations as leading tone chords to a tonic chord one semitone above (B in this case).

Answer: 
vii7b5 = (me),se,te,re => V7 without root tone

VIIdim7 = (me),se,te,re,fa => Vb9

**me or mi** in brackets as it can be considered as dropped root tone of the dom7 respectively dom7b9.

Critical point to decide which chord will better fit is the melody: if it contains the b9 (in F#,**A#,C#,E,G**) this would be **G** - then the **A#dim7** sounds better, if there is a **G#** you play the 7b5 chord:**A#m7b5**
I don't have much to add to other posts concerning the analysis, however I'd like to point another point. In some cases indeed either diminished and half-diminished chords might provide good harmonization of a melody, however they sound substantially different. If you play one or another randomly, due to mistakes, it might be very confusing for the rest of the band. It is very different from substituting e.g. Cmaj7 with C6, which can be innocent 90% of times.