In May 1945 (maybe late April), Himmler fled westward to the American/British lines, hoping to be accomodated in negotiations for a separate peace and a continuation of the war against the Soviets. He was rebuffed, and taken into custody. While in custody, he crunched the cyanide capsule.
Ah, I thought you had him mixed up with Hess, which was an earlier defection.
Material I'd seen on Himmlers fate indicated the the negotiations for a separate peace (via Swedish Count Bernadotte) and his capture by the British were seperate events. Oh well, material from this era will be mined for decades to come!