Identifying this resistor/capacitor
I'll be an outlier here and guess that it's a (blown) 0.5A "pico fuse" style fuse, and I'd be pretty sure if it's the first thing connected to the mains wire.  

Break it apart you'll quickly see what its made of (and can easily rule out inductor, if there's no copper wire inside). A fuse and a resistor may not be easy to distinguish. 

If it is a fuse, and if it's blown, there's a significant chance other stuff is blowed up good. Poke around and check the power semiconductors and diodes. 

Edit: For those who have little experience with Asian manufacturing, here's an example of the type of fuse, mostly supplied by Chinese manufacturers: 



The 'cement' finish in the OP's photo (rather than the smooth lacquer you'd expect on an inductor or resistor) is another not-so-subtle clue as to the functionality.