What is a 0118 transistor?
Found it.  That is indeed NOT a transistor. 

It is a CL0118 LED driver. It uses an inductor to boost the voltage of a single cell high enough to drive a white LED. It will operate from cells that are very close to empty - input range of 0.8 to 1.5V.

Link to the datasheet for the closely related CL0117

Here's the example circuit from the datasheet:



It looks almost exactly like yours.  The part you thought was a resistor is actually an inductor.  They look a lot alike, but @sstobbe is right that it is an inductor. Inductors in axial packages tend to be green, unlike beige or grey for resistors. 

I've posted information and links for the CL0117 because I could find good links for it, but the CL0118 should match it pretty well.  You'll want to buy a replacement from someplace that can give a correct datasheet, anyway.