Erstwhile is a synonym of bygone.
As adjectives the difference between erstwhile and bygone
is that
erstwhile is (literary|legal) former, previous while
bygone is having been or happened in the far past.
As an adverb erstwhile
is formerly; in the past.
As a noun bygone is
a person or occurrence that took place in the past.