Although yEd does not come with special support for formulas, for simple formulas, the HTML markup support (which also enables using superscript and subscript text) might already do the trick. Please see: http://yed.yworks.com/support/qa/16
For complex formulas you could try to create an image that depicts the formula and add the image as an icon to a label in yEd. For this you can even use SVG as noted in a comment here: http://yed.yworks.com/support/qa/2731