how to electrically isolate a PCB from a heat sink
Typical solutions I've used are either Kapton tape:



Or Sil-Pad:


  Sil-Pad 400 is a composite of silicone rubber and fiberglass. The
  material is flame retardant and is specially formulated for use as a
  thermally conductive insulator. The primary use for Sil-Pad 400 is to
  electrically isolate power sources from heat sinks.




If you use a sil-pad the screw will still electrically connect the componet tab with the heat sink.  A solution to this is to use a shoulder washer to isolate the screw and the tab: