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: 
The basic triad (which is what usually gives the main "color" to the chord) is the same, and being a diminshed fifth it creates a lots of tension towards the next one - usually a half tone above, and usually the tonic.

They *are* similar and often interchangeable. While they are not diatonic on both major and minor mode, they can "exist" in those modes:

* in minor mode, the root and seventh of m7b5 are the seventh and sixth melodic degrees ("augmented");
* in major mode, the seventh of dim7 is the harmonic ("lowered") sixth;

The lowered sixth "sounds good" in both modes because it creates a big tension that leads to the fifth, and also due to the fact that it creates another tritone with the third of the chord.

The m7b5 chord is usually considered less powerful than the dim7, as the seventh has less tension towards any resolution, but it can still create interesting effects. The choice depends on the composer/arranger/performer, but it obviously should not collide with any other voice (the melody) and should consider the overall harmony and current harmonic progression.
While m7♭5 chords and dim7 chords are fairly interchangeable as dominant-function chords (don't interchange them if the melody note is the 7th), the dim7 chord is a much better **pivot chord** between keys than the m7♭5 chord, as any given dim7 chord is an enharmonic re-spelling of 3 other dim7 chords, while a m7♭5 chord cannot be enharmonically re-spelled into any other m7♭5 chords. When a dim7 chord is acting as a pivot chord, interchanging it is unwise.