The problem is your application thinks it is running HTTP and not HTTPS so it will generate HTTP links. On the f5 you can get around this using the stream profile. This will have the LTM rewrite the HTTP links to HTTPS links. This is not a redirect so you will not get into the redirect loop. The other thing you can try is in the HTTP profile you can redirect rewrite. This will cause the LTM to rewrite 302 redirect to be HTTPS instead of HTTP.
redirect rewrite
http://support.f5.com/kb/en-us/solutions/public/6000/900/sol6912.html?sr=23090158
Information on stream profile
http://support.f5.com/kb/en-us/solutions/public/8000/100/sol8115.html